In GDI we have the API PathToRegion_() to create a region from the drawing path: Great!
In the VectorDrawing library of PB there's no way to save a path.
Does anybody know if this is faesible in some way or another?
Some hidden PB internal(s) to access perhaps?
I am now using GDI regions in my new project (http://www.raxntrax.com/pixys2).
It works as expected, but since they are pixel based, they give some jitter when resizing/rotating...
PathToRegion for VectorDrawing?
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PathToRegion for VectorDrawing?
Hi sq4
It was my understanding that the Windows version of the Vector lib is based on GdiPlus......
Have you seen these posts? Might help:
DrawVectorEx Module by Thorsten1867
Some Tips using VectorDrawing lib
It was my understanding that the Windows version of the Vector lib is based on GdiPlus......
Have you seen these posts? Might help:
DrawVectorEx Module by Thorsten1867
Some Tips using VectorDrawing lib
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PathToRegion for VectorDrawing?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PathToRegion for VectorDrawing?
Isn't ClipPath what you looking for?
https://www.purebasic.com/documentation ... ppath.html
https://www.purebasic.com/documentation ... ppath.html
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: PathToRegion for VectorDrawing?
Yes, I know, and that's why I asked about a PathToRegion alternative.IdeasVacuum wrote:Hi sq4
It was my understanding that the Windows version of the Vector lib is based on GdiPlus......
In the VectorDrawing lib ClipPath() clips whatever is in the drawing path.
In GDI otoh you could use SelectClipRgn_() with a previously saved GDI region.
PathSegments() / AddPathSegments() is kind of a GDI PathToRegion() alternative, but still you need to draw those in order for ClipPath() to work.
I think I have to conclude that GDI+ just doesn't support region objects...
Thanks for those links.