DrawableImage.draw

Draw the image.

draw is the usual method, which enables scaling and filtering, likely making it preferable for most images. However, for images that have been generated (like text) or adjusted to display on the user's screen (like icons), drawHinted may be preferrable.

  1. void draw(Rectangle destination, Color tint)
  2. void draw(Vector2 destination, Color tint)
    struct DrawableImage
    nothrow
    void
    draw
    (,
    Color tint = Color(0xff, 0xff, 0xff, 0xff)
    )

Parameters

destination Vector2

Place in the canvas to draw the texture to. If a rectangle is given, the image will stretch to fix this box.

tint Color

Color to multiply the image by. Can be used to reduce opacity, darken or change color. Defaults to white (no change).

See Also

CanvasIO.drawImage, CanvasIO.drawHintedImage

Meta