aboutsummaryrefslogtreecommitdiff
path: root/test/canvas.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/canvas.c')
-rw-r--r--test/canvas.c42
1 files changed, 26 insertions, 16 deletions
diff --git a/test/canvas.c b/test/canvas.c
index 730549f..fddd551 100644
--- a/test/canvas.c
+++ b/test/canvas.c
@@ -94,32 +94,42 @@ _unlock(atomic_flag *lock)
atomic_flag_clear_explicit(lock, memory_order_release);
}
+static const float lv2_L [] = {
+ 0.05, 0.275,
+ 0.05, 0.73463521816969,
+ 0.39996786383766, 0.73463521816969,
+ 0.35805418792799, 0.61981755929103,
+ 0.16950515672412, 0.61981755929103,
+ 0.16950515672412, 0.275,
+ 0.05, 0.275
+};
+
+static const float lv2_V [] = {
+ 0.44035674587458, 0.73463521816969,
+ 0.27321237521861, 0.275,
+ 0.39612954205777, 0.275,
+ 0.5215250619933, 0.61980400005209,
+ 0.64678627651808, 0.275,
+ 0.76999411666921, 0.275,
+ 0.60269884777111, 0.73463521816969,
+ 0.44035674587458, 0.73463521816969
+};
+
static inline LV2_Atom_Forge_Ref
_lv2_logo_forge(LV2_Atom_Forge *forge, LV2_Canvas_URID *urid)
{
const uint32_t fg = 0xbb6600ff;
LV2_Atom_Forge_Ref ref;
-
+
if( (ref = lv2_canvas_forge_beginPath(forge, urid))
- && (ref = lv2_canvas_forge_moveTo(forge, urid, 0.05, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.05, 0.73463521816969))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.39996786383766, 0.73463521816969))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.35805418792799, 0.61981755929103))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.16950515672412, 0.61981755929103))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.16950515672412, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.05, 0.275))
+ && (ref = lv2_canvas_forge_polyLine(forge, urid, sizeof(lv2_L)/sizeof(float), lv2_L))
+ && (ref = lv2_canvas_forge_closePath(forge, urid))
&& (ref = lv2_canvas_forge_style(forge, urid, fg))
&& (ref = lv2_canvas_forge_stroke(forge, urid))
&& (ref = lv2_canvas_forge_beginPath(forge, urid))
- && (ref = lv2_canvas_forge_moveTo(forge, urid, 0.44035674587458, 0.73463521816969))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.27321237521861, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.39612954205777, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.5215250619933, 0.61980400005209))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.64678627651808, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.76999411666921, 0.275))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.60269884777111, 0.73463521816969))
- && (ref = lv2_canvas_forge_lineTo(forge, urid, 0.44035674587458, 0.73463521816969))
+ && (ref = lv2_canvas_forge_polyLine(forge, urid, sizeof(lv2_L)/sizeof(float), lv2_V))
+ && (ref = lv2_canvas_forge_closePath(forge, urid))
&& (ref = lv2_canvas_forge_style(forge, urid, fg))
&& (ref = lv2_canvas_forge_stroke(forge, urid))