Polygon

final case class Polygon(vertices: Batch[Point], fill: Fill, stroke: Stroke, lighting: LightingModel, eventHandlerEnabled: Boolean, eventHandler: (Polygon, GlobalEvent) => Option[GlobalEvent], rotation: Radians, scale: Vector2, depth: Depth, ref: Point, flip: Flip, shaderId: Option[ShaderId]) extends Shape[Polygon]

Draws an arbitrary polygon with up to 16 vertices.

Companion:
object
trait Serializable
trait Product
trait Equals
trait Shape[Polygon]
trait Cloneable
trait SceneNode
class Object
trait Matchable
class Any

Type members

Inherited types

type Out = T
Inherited from:
RenderNode

Value members

Concrete methods

def flipHorizontal(isFlipped: Boolean): Polygon
def flipVertical(isFlipped: Boolean): Polygon
def moveBy(pt: Point): Polygon
def moveBy(x: Int, y: Int): Polygon
def moveTo(pt: Point): Polygon
def moveTo(x: Int, y: Int): Polygon
def rotateBy(angle: Radians): Polygon
def rotateTo(angle: Radians): Polygon
def scaleBy(amount: Vector2): Polygon
def transformBy(positionDiff: Point, rotationDiff: Radians, scaleDiff: Vector2): Polygon
def transformTo(newPosition: Point, newRotation: Radians, newScale: Vector2): Polygon
def withDepth(newDepth: Depth): Polygon
def withFillColor(newFill: Fill): Polygon
def withFlip(newFlip: Flip): Polygon
def withPosition(newPosition: Point): Polygon
def withRef(newRef: Point): Polygon
def withRef(x: Int, y: Int): Polygon
def withRotation(newRotation: Radians): Polygon
def withScale(newScale: Vector2): Polygon
def withShaderId(newShaderId: ShaderId): Polygon
def withStroke(newStroke: Stroke): Polygon
def withStrokeColor(newStrokeColor: RGBA): Polygon
def withStrokeWidth(newWidth: Int): Polygon

Inherited methods

Inherited from:
Shape
Inherited from:
Product

Concrete fields

lazy val position: Point
lazy val size: Size