MCPcopy
hub / github.com/pixijs/pixijs / ShapePrimitive

Interface ShapePrimitive

src/maths/shapes/ShapePrimitive.ts:37–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 * @advanced
36 */
37export interface ShapePrimitive
38{
39 /** The type of the object, mainly used to avoid `instanceof` checks */
40 readonly type: SHAPE_PRIMITIVE | (string & {});
41
42 /** Checks whether the x and y coordinates passed to this function are contained within this ShapePrimitive. */
43 contains(x: number, y: number): boolean;
44 /** Checks whether the x and y coordinates passed to this function are contained within the stroke of this shape */
45 strokeContains(x: number, y: number, strokeWidth: number, alignment?: number): boolean;
46 /** Creates a clone of this ShapePrimitive instance. */
47 clone(): ShapePrimitive;
48 /** Copies the properties from another ShapePrimitive to this ShapePrimitive. */
49 copyFrom(source: ShapePrimitive): void;
50 /** Copies the properties from this ShapePrimitive to another ShapePrimitive. */
51 copyTo(destination: ShapePrimitive): void;
52 /** Returns the framing rectangle of the ShapePrimitive as a Rectangle object. */
53 getBounds(out?: Rectangle): Rectangle;
54
55 /** The X coordinate of the shape */
56 readonly x: number;
57 /** The Y coordinate of the shape */
58 readonly y: number;
59}

Callers 42

Circle.test.tsFile · 0.65
Ellipse.test.tsFile · 0.65
Polygon.test.tsFile · 0.65
Rectangle.test.tsFile · 0.65
containsPointMethod · 0.65
Circle.test.tsFile · 0.65
Ellipse.test.tsFile · 0.65
Polygon.test.tsFile · 0.65
Rectangle.test.tsFile · 0.65
genericPointerToWireTypeFunction · 0.65

Implementers 6

Circlesrc/maths/shapes/Circle.ts
Trianglesrc/maths/shapes/Triangle.ts
Polygonsrc/maths/shapes/Polygon.ts
Rectanglesrc/maths/shapes/Rectangle.ts
Ellipsesrc/maths/shapes/Ellipse.ts
RoundedRectanglesrc/maths/shapes/RoundedRectangle.ts

Calls

no outgoing calls

Tested by

no test coverage detected