
EditorFactory - Module for object management in a Canvas
Re: EditorFactory - Module for object management in a Canvas
Merci ShadowSorm 

- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
-
- Enthusiast
- Posts: 303
- Joined: Tue Feb 14, 2017 12:07 pm
Re: EditorFactory - Module for object management in a Canvas
De rien, si tu as besoin d'aide hésite pas

I am French, I do not speak English.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
My apologies for the mistakes.
I have sometimes problems of expression
I am sometimes quite clumsy, please excuse me and let me know.
Re: EditorFactory - Module for object management in a Canvas
Hello
How can we save the result of drawing by EditorFactory on canvas as svg?
How can we save the result of drawing by EditorFactory on canvas as svg?
Re: EditorFactory - Module for object management in a Canvas
There is no module function for this.punak wrote: Tue Sep 02, 2025 7:42 pm Hello
How can we save the result of drawing by EditorFactory on canvas as svg?
However, PureBasic has the command SvgVectorOutput(), which you can use in the StartVectorDrawing() function, instead of the CanvasVectorOutput().
In principle, there is only one call of StartVectorDrawing() in the EditorFactory-include, it's in the private module function: ObjectDrawing(), you can search for it in the source code. So it should be possible to add an additional parameter to trigger an output to a SVG file.
However, I never tried the SvgVectorOutput() command, I'm not sure if it has the same functionality for drawings as CanvasVectorOutput().
I can try it on weekend, or you can try it yourself.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: EditorFactory - Module for object management in a Canvas
@STARGÅTE : Thanks for your help.
Another question : How do I create a snap to grid mode to move objects?
Another question : How do I create a snap to grid mode to move objects?
Re: EditorFactory - Module for object management in a Canvas
With the module function SetObjectMovementStep() and SetObjectResizeStep() you can define a grid snapping for movements and resizing. You can define it by default (for new objects), for all objects, or a specific object.punak wrote: Wed Sep 03, 2025 8:05 pm @STARGÅTE : Thanks for your help.
Another question : How do I create a snap to grid mode to move objects?
For example, the call of EditorFactory::SetObjectMovementStep(#Object_Default, 10, 10) defines a 10-px-grid for all new objects.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: EditorFactory - Module for object management in a Canvas
Hello again,
How to enable z-order feature in this module? I want an object to be placed above other objects when I click on it.
Of course, if possible, please add the save to svg function.
How to enable z-order feature in this module? I want an object to be placed above other objects when I click on it.
Of course, if possible, please add the save to svg function.
Re: EditorFactory - Module for object management in a Canvas
Please take a look in Example04_Object-order.pb from the download.punak wrote: Fri Sep 05, 2025 12:48 pm Hello again,
How to enable z-order feature in this module? I want an object to be placed above other objects when I click on it.
SetObjectLayer() can be used to change the z-order and with CanvasObjectsEvent() you can detect a click.
I will try it on weekend, as I said.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: EditorFactory - Module for object management in a Canvas
I quickly checked the option to save the canvas output as a SVG.punak wrote: Tue Sep 02, 2025 7:42 pm How can we save the result of drawing by EditorFactory on canvas as svg?
Indeed, it is relatively easy to add this feature.
However, the saved SVG image is simplified and not complete:
- In my test, text (with fonts) was not exported.
- Color gradient areas were just solid color.
If both is not relevant to you, I can provide you with a procedure.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: EditorFactory - Module for object management in a Canvas
Thanks for following up on my request.
I am building a visual calendar designer using your powerful EditorFactory - Module and of course, with the copilot laborious consultations
Your designer's output is a vector file for graphic designers.
The font problem seems to be a bug (SvgVectorOutput) and needs to be fixed. I mentioned it in the following thread.
viewtopic.php?t=87523
For other cases, it doesn't matter at all, just draw the same simple shape, it's great.
I am building a visual calendar designer using your powerful EditorFactory - Module and of course, with the copilot laborious consultations

Your designer's output is a vector file for graphic designers.
The font problem seems to be a bug (SvgVectorOutput) and needs to be fixed. I mentioned it in the following thread.
viewtopic.php?t=87523
For other cases, it doesn't matter at all, just draw the same simple shape, it's great.
Re: EditorFactory - Module for object management in a Canvas
I'm posting again because I'm in a bit of a hurry.
Now, if I use svgVectorOutput instead of canvasVectoroutput in the objectdrawing function, will there be any problems with the drawing???
Now, if I use svgVectorOutput instead of canvasVectoroutput in the objectdrawing function, will there be any problems with the drawing???
Re: EditorFactory - Module for object management in a Canvas
I will upload an experimental version for you in a few hours and send you a PN.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module