finite_draw_stroke
The finite_draw_stroke function attempts to draw a stroke around the latest rectangle.
void finite_draw_stroke(FiniteShell *shell, FiniteColorGroup *color, cairo_pattern_t *pat, int width)Parameters
Section titled “Parameters”| Type | Description |
|---|---|
FiniteShell *shell | The FiniteShell where the window is. |
FiniteColorGroup *color | A single FiniteColorGroup |
cairo_pattern_t *pat | A single Cairo Pattern. |
int width | The thickness of the stroke. |
Code Example
Section titled “Code Example”#include <finite/draw.h>
FiniteColorGroup myColor = { .r = 0, .g = 0, .b = 0};
FiniteColorGroup myStroke = { .r = 0.9, .g = 0.9, .b = 0.9};
finite_draw_rect(myShell, 0,0, width, height, &myColor, NULL, true); // withPreserve must be true
finite_draw_stroke(myShell, &myStroke, NULL, 5);This function doesn’t use information from finite_draw_set_draw_position as of v0.6.0
If shell.cr is undefined, this function will not create a new Cairo draw tool and instead will throw an error.
Standard Usage
Section titled “Standard Usage”This function must have a valid FiniteShell
This function uses Cairo which requires a valid cairo_surface_t in FiniteShell.cairo_surface beforehand.