mirror of
https://github.com/dyne/FreeJ.git
synced 2026-04-21 17:14:24 +02:00
new VectorLayer
linking cairo library ready for serving processing.js wrapper, also imported
This commit is contained in:
16
scripts/javascript/examples/vector_test.js
Normal file
16
scripts/javascript/examples/vector_test.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// simple test for CairoLayer
|
||||
|
||||
scr = new Screen();
|
||||
if (!scr.is_initialized()) {
|
||||
// screen hasn't been initialized yet, let's do it now
|
||||
scr.init(400,300);
|
||||
add_screen(scr);
|
||||
}
|
||||
|
||||
vec = new VectorLayer(400, 300);
|
||||
vec.activate(true);
|
||||
scr.add_layer(vec);
|
||||
|
||||
vec.beginPath();
|
||||
vec.arc(50.5, 50.5, 80.25, 3.141592654, 1.4);
|
||||
vec.stroke();
|
||||
Reference in New Issue
Block a user