void Graphics::drawImage (const Image& imageToDraw, int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh, const bool fillAlphaChannelWithCurrentBrush) const { if (imageToDraw.isValid() && context.clipRegionIntersects (coordsToRectangle (dx, dy, dw, dh))) drawImageTransformed (imageToDraw.getClippedImage (coordsToRectangle (sx, sy, sw, sh)), AffineTransform::scale (dw / (float) sw, dh / (float) sh) .translated ((float) dx, (float) dy), fillAlphaChannelWithCurrentBrush); }
void Graphics::drawFittedText (const String& text, const int x, const int y, const int width, const int height, Justification justification, const int maximumNumberOfLines, const float minimumHorizontalScale) const { drawFittedText (text, coordsToRectangle (x, y, width, height), justification, maximumNumberOfLines, minimumHorizontalScale); }
void Graphics::drawImageWithin (const Image& imageToDraw, int dx, int dy, int dw, int dh, RectanglePlacement placementWithinTarget, const bool fillAlphaChannelWithCurrentBrush) const { if (imageToDraw.isValid()) drawImageTransformed (imageToDraw, placementWithinTarget.getTransformToFit (imageToDraw.getBounds().toFloat(), coordsToRectangle (dx, dy, dw, dh).toFloat()), fillAlphaChannelWithCurrentBrush); }
void Graphics::drawRoundedRectangle (float x, float y, float width, float height, float cornerSize, float lineThickness) const { drawRoundedRectangle (coordsToRectangle (x, y, width, height), cornerSize, lineThickness); }
void Graphics::fillRoundedRectangle (float x, float y, float width, float height, float cornerSize) const { fillRoundedRectangle (coordsToRectangle (x, y, width, height), cornerSize); }
void Graphics::drawRect (int x, int y, int width, int height, int lineThickness) const { drawRect (coordsToRectangle (x, y, width, height), lineThickness); }
//============================================================================== void Graphics::drawRect (float x, float y, float width, float height, float lineThickness) const { drawRect (coordsToRectangle (x, y, width, height), lineThickness); }
void Graphics::fillRect (float x, float y, float width, float height) const { fillRect (coordsToRectangle (x, y, width, height)); }
void Graphics::fillRect (int x, int y, int width, int height) const { context.fillRect (coordsToRectangle (x, y, width, height), false); }
bool Graphics::reduceClipRegion (int x, int y, int w, int h) { return reduceClipRegion (coordsToRectangle (x, y, w, h)); }
void Graphics::drawImageWithin (const Image& imageToDraw, int dx, int dy, int dw, int dh, RectanglePlacement placementWithinTarget, bool fillAlphaChannelWithCurrentBrush) const { drawImage (imageToDraw, coordsToRectangle (dx, dy, dw, dh).toFloat(), placementWithinTarget, fillAlphaChannelWithCurrentBrush); }
void Graphics::fillEllipse (float x, float y, float w, float h) const { fillEllipse (coordsToRectangle (x, y, w, h)); }
void Graphics::drawText (const String& text, int x, int y, int width, int height, Justification justificationType, const bool useEllipsesIfTooBig) const { drawText (text, coordsToRectangle (x, y, width, height), justificationType, useEllipsesIfTooBig); }