Polygon

indigo.shared.scenegraph.Shape.Polygon
See thePolygon companion object
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.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape[Polygon]
trait Cloneable
trait SceneNode
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Out = T

Attributes

Inherited from:
RenderNode

Value members

Concrete methods

def flipHorizontal(isFlipped: Boolean): Polygon
def flipVertical(isFlipped: Boolean): Polygon
def modifyFill(modifier: Fill => Fill): Polygon
def modifyStroke(modifier: Stroke => Stroke): 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 onEvent(f: PartialFunction[(Polygon, GlobalEvent), GlobalEvent]): Polygon
def rotateBy(angle: Radians): Polygon
def rotateTo(angle: Radians): Polygon
def scaleBy(amount: Vector2): Polygon
def scaleBy(x: Double, y: Double): 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 withFill(newFill: Fill): Polygon
def withFlip(newFlip: Flip): Polygon
def withLighting(newLighting: LightingModel): 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

Deprecated methods

def withFillColor(newFill: Fill): Polygon

Attributes

Deprecated
true

Inherited methods

Attributes

Inherited from:
Shape
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val position: Point
lazy val size: Size