A single gradient stop. A gradient stop defines a color and a position.
| 368 | |
| 369 | |
| 370 | class _GradientStop(ElementProxy): |
| 371 | """A single gradient stop. |
| 372 | |
| 373 | A gradient stop defines a color and a position. |
| 374 | """ |
| 375 | |
| 376 | def __init__(self, gs): |
| 377 | super(_GradientStop, self).__init__(gs) |
| 378 | self._gs = gs |
| 379 | |
| 380 | @lazyproperty |
| 381 | def color(self): |
| 382 | """Return |ColorFormat| object controlling stop color.""" |
| 383 | return ColorFormat.from_colorchoice_parent(self._gs) |
| 384 | |
| 385 | @property |
| 386 | def position(self): |
| 387 | """Location of stop in gradient path as float between 0.0 and 1.0. |
| 388 | |
| 389 | The value represents a percentage, where 0.0 (0%) represents the |
| 390 | start of the path and 1.0 (100%) represents the end of the path. For |
| 391 | a linear gradient, these would represent opposing extents of the |
| 392 | filled area. |
| 393 | """ |
| 394 | return self._gs.pos |
| 395 | |
| 396 | @position.setter |
| 397 | def position(self, value): |
| 398 | self._gs.pos = float(value) |
no outgoing calls
searching dependent graphs…