Dgame.Graphic.Shape
« Go back
Bottom- class Shape: Dgame.Graphic.Transformable.Transformable, Dgame.Graphic.Drawable.Drawable;
- Shape defines a drawable geometric shape.
Author:
Randy Schuett (rswhite4@googlemail.com)
- enum Fill: ubyte;
- Defines how the Shape should be filled.
- Geometry geometry;
- The geometric type of the shape
See:
Geometric enum
- Fill fill;
- Fill option. Default is Fill.Full
- ubyte lineWidth;
- Option for the line width. Default is 1
- bool antiAliasing;
- Optional anti-alias for lines thicker than 1. Default is false.
Note:
this is redundant if you have already enabled anti-aliasing
- final pure nothrow @nogc this(Geometry geo);
- CTor
- final pure nothrow this(Geometry geo, Vertex[] vertices);
- CTor
- final pure nothrow this(size_t radius, const Vector2f center, size_t vecNum = 30);
- CTor for circles
- final nothrow void clear();
- Clear all Vertices but preserve the storage and capacity
- final pure nothrow void append(ref const Vertex vertex);
- Stores a Vertex
- final pure nothrow void append(const Vector2f vec);
- Stores a Vertex
- final pure nothrow void append(Vertex[] vertices);
- Stores multiple Vertices
- final inout pure nothrow @nogc inout(Vertex[]) getVertices();
- Returns all Vertices
- final pure nothrow @nogc void setColor(const Color4b col);
- Set the color of all Vertices
Note:
If you only want to set specific Vertices to a specific color, you should use getVertices() and adapt the specific entries.
- final pure nothrow @nogc void setTexture(Texture* texture);
- Set or reset a Texture
- final pure nothrow @nogc void setTexture(Texture* texture, const Rect rect);
- Set (or reset) a Texture and set the corresponding Rect
- final inout pure nothrow @nogc inout(Texture*) getTexture();
- Returns the current texture or null
- final pure nothrow @nogc void setTextureRect(const Rect rect);
- Set the corresponding Texture Rect
- final const pure nothrow @nogc Rect getVertexRect();
- Returns the Rect which contains all vertices
- final const pure nothrow @nogc Rect getClipRect();
- Returns the clip Rect
Page generated by Ddoc.
« Go back