Layer Ellipse attribute¶
- class Ellipse¶
This layer attribute renders an ellipse using the layer’s size and offset to define the outlining bounding box.
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: border: width: 50 color: red size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: color: green size: { width: 300, height: 500 } offset: { x: 450, y: 65 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: border: width: 50 color: red color: green size: { width: 400, height: 400 } offset: { x: 400, y: 115 }
- border_to_origin : bool¶
This switch controls the rendering of the border when
arc
is specified. If thearc
attribute is not specified, then this switch has no effect.By default (
false
), the border is not drawn between the arc endpoints and the angle’s origin – meaning only the arc itself has a border. Set this totrue
to render the border between arc endpoints.my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: border_to_origin: on arc: { end: 135 } color: red border: { width: 25, color: green } size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: border_to_origin: off # this is the default if not specified arc: { end: 135 } color: red border: { width: 25, color: green } size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
- color : Color | Linear_Gradient | Radial_Gradient | Conical_Gradient | None¶
The shape’s fill color.
Seealso
Please review Choosing a color section for more detail.
- class Arc¶
This attribute allows specifying starting and ending angles that render as an arc of a circle.
Important
The angle of origin (0 degrees) is 3 o’clock and increases clockwise.
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: arc: { start: 45, end: 135 } border: { width: 20, color: red } border_to_origin: on size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: arc: { start: 135, end: 225 } border: { width: 20, color: red } border_to_origin: on size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: arc: { start: 225, end: 315 } border: { width: 20, color: red } border_to_origin: on size: { width: 500, height: 300 } offset: { x: 350, y: 165 }
my-layout.yml¶layers: - background: { color: '#4051B2' } - ellipse: arc: { start: 315, end: 45 } border: { width: 20, color: red } border_to_origin: on size: { width: 500, height: 300 } offset: { x: 350, y: 165 }