Extra "ports" of juce-based plugins using the distrho build system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

247 lines
7.3KB

  1. // protojuce/cdefs/graphics.h
  2. // c definitions as exported by protoplug
  3. // included by protojuce.lua
  4. pGraphics Graphics_new(pImage imageToDrawOnto);
  5. void Graphics_delete(pGraphics g);
  6. void Graphics_setColour(pGraphics self, Colour newColour);
  7. void Graphics_setOpacity(pGraphics self, float newOpacity);
  8. void Graphics_setGradientFill(pGraphics self, const pColourGradient gradient);
  9. void Graphics_setTiledImageFill(pGraphics self, const pImage imageToUse,
  10. int anchorX, int anchorY,
  11. float opacity);
  12. void Graphics_setFillType(pGraphics self, const pFillType newFill);
  13. void Graphics_setFont(pGraphics self, const pFont newFont);
  14. void Graphics_setFont2(pGraphics self, float newFontHeight);
  15. pFont Graphics_getCurrentFont(pGraphics self);
  16. void Graphics_drawSingleLineText(pGraphics self, const char * text,
  17. int startX, int baselineY,
  18. int justification);
  19. void Graphics_drawMultiLineText(pGraphics self, const char * text,
  20. int startX, int baselineY,
  21. int maximumLineWidth);
  22. void Graphics_drawText(pGraphics self, const char * text,
  23. int x, int y, int width, int height,
  24. int justificationType,
  25. bool useEllipsesIfTooBig);
  26. void Graphics_drawText2(pGraphics self, const char * text,
  27. Rectangle_int area,
  28. int justificationType,
  29. bool useEllipsesIfTooBig);
  30. void Graphics_drawFittedText(pGraphics self, const char * text,
  31. int x, int y, int width, int height,
  32. int justificationFlags,
  33. int maximumNumberOfLines,
  34. float minimumHorizontalScale /* = 0.7f */);
  35. void Graphics_drawFittedText2(pGraphics self, const char * text,
  36. Rectangle_int area,
  37. int justificationFlags,
  38. int maximumNumberOfLines,
  39. float minimumHorizontalScale/* = 0.7f */);
  40. void Graphics_fillAll(pGraphics self);
  41. void Graphics_fillAll2(pGraphics self, Colour colourToUse);
  42. void Graphics_fillRect(pGraphics self, Rectangle_int rectangle);
  43. void Graphics_fillRect2(pGraphics self, Rectangle_float rectangle);
  44. void Graphics_fillRect3(pGraphics self, int x, int y, int width, int height);
  45. void Graphics_fillRect4(pGraphics self, float x, float y, float width, float height);
  46. void Graphics_fillRoundedRectangle(pGraphics self, float x, float y, float width, float height,
  47. float cornerSize);
  48. void Graphics_fillRoundedRectangle2(pGraphics self, Rectangle_float rectangle,
  49. float cornerSize);
  50. void Graphics_fillCheckerBoard(pGraphics self, Rectangle_int area,
  51. int checkWidth, int checkHeight,
  52. Colour colour1, Colour colour2);
  53. void Graphics_drawRect(pGraphics self, int x, int y, int width, int height, int lineThickness /* = 1 */);
  54. void Graphics_drawRect2(pGraphics self, float x, float y, float width, float height, float lineThickness/* = 1.0f */);
  55. void Graphics_drawRect3(pGraphics self, Rectangle_int rectangle, int lineThickness /* = 1 */);
  56. void Graphics_drawRect4(pGraphics self, Rectangle_float rectangle, float lineThickness /* = 1.0f */);
  57. void Graphics_drawRoundedRectangle(pGraphics self, float x, float y, float width, float height,
  58. float cornerSize, float lineThickness);
  59. void Graphics_drawRoundedRectangle2(pGraphics self, Rectangle_float rectangle,
  60. float cornerSize, float lineThickness);
  61. void Graphics_setPixel(pGraphics self, int x, int y);
  62. void Graphics_fillEllipse(pGraphics self, float x, float y, float width, float height);
  63. void Graphics_fillEllipse2(pGraphics self, Rectangle_float area);
  64. void Graphics_drawEllipse(pGraphics self, float x, float y, float width, float height,
  65. float lineThickness);
  66. void Graphics_drawLine(pGraphics self, float startX, float startY, float endX, float endY);
  67. void Graphics_drawLine2(pGraphics self, float startX, float startY, float endX, float endY, float lineThickness);
  68. void Graphics_drawLine3(pGraphics self, Line_float line);
  69. void Graphics_drawLine4(pGraphics self, Line_float line, float lineThickness);
  70. void Graphics_drawDashedLine(pGraphics self, Line_float line,
  71. const float* dashLengths, int numDashLengths,
  72. float lineThickness /* = 1.0f */,
  73. int dashIndexToStartFrom /* = 0 */);
  74. void Graphics_drawVerticalLine(pGraphics self, int x, float top, float bottom);
  75. void Graphics_drawHorizontalLine(pGraphics self, int y, float left, float right);
  76. void Graphics_fillPath(pGraphics self, pPath path,
  77. AffineTransform transform);
  78. void Graphics_strokePath(pGraphics self, pPath path,
  79. PathStrokeType strokeType,
  80. AffineTransform transform);
  81. void Graphics_drawArrow(pGraphics self, Line_float line,
  82. float lineThickness,
  83. float arrowheadWidth,
  84. float arrowheadLength);
  85. void Graphics_setImageResamplingQuality(pGraphics self, const int newQuality);
  86. void Graphics_drawImageAt(pGraphics self, pImage imageToDraw, int topLeftX, int topLeftY,
  87. bool fillAlphaChannelWithCurrentBrush /* = false */);
  88. void Graphics_drawImage(pGraphics self, pImage imageToDraw,
  89. int destX, int destY, int destWidth, int destHeight,
  90. int sourceX, int sourceY, int sourceWidth, int sourceHeight,
  91. bool fillAlphaChannelWithCurrentBrush /* = false */);
  92. void Graphics_drawImageTransformed(pGraphics self, pImage imageToDraw,
  93. AffineTransform transform,
  94. bool fillAlphaChannelWithCurrentBrush /* = false */);
  95. void Graphics_drawImageWithin(pGraphics self, pImage imageToDraw,
  96. int destX, int destY, int destWidth, int destHeight,
  97. int placementWithinTarget,
  98. bool fillAlphaChannelWithCurrentBrush /* = false */);
  99. Rectangle_int Graphics_getClipBounds(pGraphics self);
  100. bool Graphics_clipRegionIntersects(pGraphics self, Rectangle_int area);
  101. bool Graphics_reduceClipRegion(pGraphics self, int x, int y, int width, int height);
  102. bool Graphics_reduceClipRegion2(pGraphics self, Rectangle_int area);
  103. bool Graphics_reduceClipRegion4(pGraphics self, pPath path, AffineTransform transform);
  104. bool Graphics_reduceClipRegion5(pGraphics self, pImage image, AffineTransform transform);
  105. void Graphics_excludeClipRegion(pGraphics self, Rectangle_int rectangleToExclude);
  106. bool Graphics_isClipEmpty(pGraphics self);
  107. void Graphics_saveState(pGraphics self);
  108. void Graphics_restoreState(pGraphics self);
  109. void Graphics_beginTransparencyLayer(pGraphics self, float layerOpacity);
  110. void Graphics_endTransparencyLayer(pGraphics self);
  111. void Graphics_setOrigin(pGraphics self, Point_int newOrigin);
  112. void Graphics_setOrigin2(pGraphics self, int newOriginX, int newOriginY);
  113. void Graphics_addTransform(pGraphics self, AffineTransform transform);
  114. void Graphics_resetToDefaultState(pGraphics self);
  115. bool Graphics_isVectorDevice(pGraphics self);