MCPcopy
hub / github.com/pixijs/pixijs / Ellipse

Class Ellipse

src/maths/shapes/Ellipse.ts:30–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 * @standard
29 */
30export class Ellipse implements ShapePrimitive
31{
32 /**
33 * The X coordinate of the center of this ellipse
34 * @example
35 * ```ts
36 * // Basic x position
37 * const ellipse = new Ellipse();
38 * ellipse.x = 100;
39 * ```
40 * @default 0
41 */
42 public x: number;
43
44 /**
45 * The Y coordinate of the center of this ellipse
46 * @example
47 * ```ts
48 * // Basic y position
49 * const ellipse = new Ellipse();
50 * ellipse.y = 200;
51 * ```
52 * @default 0
53 */
54 public y: number;
55
56 /**
57 * The half width of this ellipse
58 * @example
59 * ```ts
60 * // Set half width
61 * const ellipse = new Ellipse(100, 100);
62 * ellipse.halfWidth = 50; // Total width will be 100
63 * ```
64 * @default 0
65 */
66 public halfWidth: number;
67
68 /**
69 * The half height of this ellipse
70 * @example
71 * ```ts
72 * // Set half height
73 * const ellipse = new Ellipse(100, 100);
74 * ellipse.halfHeight = 25; // Total height will be 50
75 * ```
76 * @default 0
77 */
78 public halfHeight: number;
79
80 /**
81 * The type of the object, mainly used to avoid `instanceof` checks
82 * @example
83 * ```ts
84 * // Check shape type
85 * const shape = new Ellipse(0, 0, 50, 25);
86 * console.log(shape.type); // 'ellipse'
87 *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected