dsfml.graphics.shape

$(U Shape) is a drawable class that allows to define and display a custom convex shape on a render target.

It's only an abstract base, it needs to be specialized for concrete types of shapes (circle, rectangle, convex polygon, star, ...).

In addition to the attributes provided by the specialized shape classes, a shape always has the following attributes:

  • a texture
  • a texture rectangle
  • a fill color
  • an outline color
  • an outline thickness

$(PARA Each feature is optional, and can be disabled easily:)

  • the texture can be null
  • the fill/outline colors can be Color.Transparent
  • the outline thickness can be zero

$(PARA You can write your own derived shape class, there are only two abstract functions to override:)

  • getPointCount must return the number of points of the shape
  • getPoint must return the points of the shape

Members

Classes

Shape
class Shape

Base class for textured shapes with outline.

See Also

$(RECTANGLESHAPE_LINK), $(CIRCLESHAPE_LINK), $(CONVEXSHAPE_LINK), $(TRANSFORMABLE_LINK)

Meta