ResolutionOverride

This node sets a static resolution for its content, ignoring (overriding) whatever layout was assigned by its parent.

Works only with the new I/O system introduced in Fluid 0.7.2.

ResolutionOverride requires an active instance of CanvasIO to work. It will locally override its dpi value — with a default of (96, 96) — to make sure the output is consistent. The DPI value can be changed using the dpi method.

Constructors

this
this(Vector2 resolution, Ts args)

Create a node locked to a set resolution.

Members

Functions

cropArea
Optional!Rectangle cropArea()
Undocumented in source. Be warned that the author may not have intended to support it.
cropArea
void cropArea(Rectangle area)
Undocumented in source. Be warned that the author may not have intended to support it.
dpi
Vector2 dpi()
Undocumented in source. Be warned that the author may not have intended to support it.
dpi
Vector2 dpi(Vector2 value)
Undocumented in source. Be warned that the author may not have intended to support it.
drawCircleImpl
void drawCircleImpl(Vector2 center, float radius, Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawCircleOutlineImpl
void drawCircleOutlineImpl(Vector2 center, float radius, float width, Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawHintedImageImpl
void drawHintedImageImpl(DrawableImage image, Rectangle destination, Color tint)
Undocumented in source. Be warned that the author may not have intended to support it.
drawImageImpl
void drawImageImpl(DrawableImage image, Rectangle destination, Color tint)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLineImpl
void drawLineImpl(Vector2 start, Vector2 end, float width, Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawRectangleImpl
void drawRectangleImpl(Rectangle rectangle, Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
drawTriangleImpl
void drawTriangleImpl(Vector2 a, Vector2 b, Vector2 c, Color color)
Undocumented in source. Be warned that the author may not have intended to support it.
load
int load(Image image)
Undocumented in source. Be warned that the author may not have intended to support it.
marginBoxForSpace
Rectangle marginBoxForSpace(Rectangle space)
Undocumented in source. Be warned that the author may not have intended to support it.
resetCropArea
void resetCropArea()
Undocumented in source. Be warned that the author may not have intended to support it.
resizeImpl
void resizeImpl(Vector2 )
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

canvasIO
CanvasIO canvasIO;
Undocumented in source.
resolution
Vector2 resolution;

Desired resolution for the lock. Specified in dots, rather than Fluid's DPI-independent pixels, so it will not be affected by the scaling setting of the desktop environment.

Inherited Members

From CanvasIO

dpi
Vector2 dpi()

Determines the screen's pixel density. A higher value will effectively scale up the interface, but keeping all detail. The I/O system should trigger a resize when this changes.

toDots
Vector2 toDots(Vector2 pixels)

Convert pixels to screen-dependent dots.

fromDots
Vector2 fromDots(Vector2 dots)

Measure distance in pixels taken by a number of dots.

cropArea
Optional!Rectangle cropArea()

Getter for the current crop area, if one is set. Any shape drawn is cropped to fit this area on the canvas.

cropArea
void cropArea(Rectangle area)
void cropArea(Optional!Rectangle area)

Set an area the shapes can be drawn in. Any shape drawn after this call will be cropped to fit the specified rectangle on the canvas.

intersectCrop
Optional!Rectangle intersectCrop(Rectangle rectangle)

Crop the area to fit. Unlike setting cropArea, this will not replace the old area, but create an intersection between the new and old area.

resetCropArea
void resetCropArea()

If cropArea was called before, this will reset set area, disabling the effect.

drawTriangleImpl
void drawTriangleImpl(Vector2 a, Vector2 b, Vector2 c, Color color)
drawTriangle
void drawTriangle(Vector2 a, Vector2 b, Vector2 c, Color color)

Draw a triangle, consisting of 3 vertices with counter-clockwise winding.

drawTriangleOutline
void drawTriangleOutline(Vector2 a, Vector2 b, Vector2 c, float width, Color color)

Draw an outline of a triangle.

drawCircleImpl
void drawCircleImpl(Vector2 center, float radius, Color color)
drawCircle
void drawCircle(Vector2 center, float radius, Color color)

Draw a circle.

drawCircleOutlineImpl
void drawCircleOutlineImpl(Vector2 center, float radius, float width, Color color)
drawCircleOutline
void drawCircleOutline(Vector2 center, float radius, float width, Color color)

Draw the outline of a circle.

drawRectangleImpl
void drawRectangleImpl(Rectangle rectangle, Color color)
drawRectangle
void drawRectangle(Rectangle rectangle, Color color)

Draw a rectangle.

drawRectangleOutline
void drawRectangleOutline(Rectangle rectangle, float width, Color color)

Draw an outline of a rectangle.

drawLineImpl
void drawLineImpl(Vector2 start, Vector2 end, float width, Color color)
drawLine
void drawLine(Vector2 start, Vector2 end, float width, Color color)

Draw a line between two points.

load
int load(Image image)

Prepare an image for drawing. For hardware accelerated backends, this may involve uploading the texture to the GPU.

drawImageImpl
void drawImageImpl(DrawableImage image, Rectangle destination, Color tint)
drawImage
void drawImage(DrawableImage image, Rectangle destination, Color tint)
void drawImage(DrawableImage image, Vector2 destination, Color tint)
drawHintedImageImpl
void drawHintedImageImpl(DrawableImage image, Rectangle destination, Color tint)

Draw an image on the canvas.

drawHintedImage
void drawHintedImage(DrawableImage image, Rectangle destination, Color tint)
Undocumented in source. Be warned that the author may not have intended to support it.
drawHintedImage
void drawHintedImage(DrawableImage image, Vector2 destination, Color tint)

Draw an image on the canvas.

Meta