If Vector Layers could be given ID's, that would lend greater flexibility.
It would be very useful to be able to Show/Hide layers individually and to Delete Layers.
This capability is common in the world of drawing.
Vector Drawing. User Applied ID for Layer
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Vector Drawing. User Applied ID for Layer
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Vector Drawing. User Applied ID for Layer
The EndVectorLayer() command draws the finished layer on the layer below. The layer stops existing after that. You can't modify it later.
quidquid Latine dictum sit altum videtur
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Vector Drawing. User Applied ID for Layer
... I'm aware of that Freak, hence my request.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: Vector Drawing. User Applied ID for Layer
I remember needing something like this as well.
I started by creating transparent images for each layer I needed.
Layer 0 was always used to draw on then when the drawing was finished Image(0) was copied to the current layer image.
Then updating the drawing on the canvas by drawing each enabled layer image onto the canvas.
I will look for my code but hope this helps.
I started by creating transparent images for each layer I needed.
Layer 0 was always used to draw on then when the drawing was finished Image(0) was copied to the current layer image.
Then updating the drawing on the canvas by drawing each enabled layer image onto the canvas.
I will look for my code but hope this helps.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: Vector Drawing. User Applied ID for Layer
Well I have found my notes.
Each layer was an image with a transparent background.
I stored the paths along with colour, stroke and layer number etc in a structured list
You get the paths with Pathsegments()
When loading, each layer is drawn first then they can all be combined into one image on a canvas.
Each layer can be turned on or off and transparency set for each layer.
Hoping my code is not on the my crashed PC.
Will keep looking.
Each layer was an image with a transparent background.
I stored the paths along with colour, stroke and layer number etc in a structured list
You get the paths with Pathsegments()
When loading, each layer is drawn first then they can all be combined into one image on a canvas.
Each layer can be turned on or off and transparency set for each layer.
Hoping my code is not on the my crashed PC.
Will keep looking.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.