canvas gadget
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 12, 2009 3:06 pm
canvas gadget
Ok ill post this again since I have not gotten any sorta response on this question I was wondering if there are some sorta examples of a drawing canvas for vector data similar to drawing canvas that FLEX has which you can pan/zoom/scale this canvas with controls. Is there anyone out there wondering the same thing?
Any thoughts on this would be greatly appreciated.
Thank you all in advance.
Any thoughts on this would be greatly appreciated.
Thank you all in advance.
Re: canvas gadget
Pan, zoom scale... your best bet would probably be to use an Enhanced metafile (Windows) and then play this to an image and seat this within an image gadget etc. Metafiles can be rescaled very easily.
I may look like a mule, but I'm not a complete ass.
Re: canvas gadget
Dunno how far you want to take this, but the g_spot stuff provides with some of that functionality, though originally it was not designed to do so 

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: canvas gadget
Did you upload it yet?blueznl wrote:Dunno how far you want to take this, but the g_spot stuff provides with some of that functionality, though originally it was not designed to do so
Re: canvas gadget
From http://www.xs4all.nl/~bluez/purebasic/p ... #0_general
29.3 Sweetspot.
Under development.
I'm currently working on a new project called 'Sweetspot'. It's still very much a secret
* Download Sweetspot. (Includes source code!)
* Sweetspot uses the g_spot resizing / 2D library. See g_spot in action on YouTube here and here.
G-spot.
One of Sweetspot's components is an include file called g_spot.pb. I have included it as part of the Sweetspot upload. (There's not much else in there right now.)
Download sweetspot.zip and look for the folder g_spot in there. In it you will find the include file, and a few examples. G-spot includes code to resize gadgets and windows and to do some limited 2D object handling and drawing, panning and zooming.
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 12, 2009 3:06 pm
Re: canvas gadget
looking at this now from what I see on the youtube exactly what I was looking for.
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 12, 2009 3:06 pm
Re: canvas gadget
sent ya a small mod to your code 

Re: canvas gadget
I'll upload a newer version tonight.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Enthusiast
- Posts: 115
- Joined: Sat Sep 12, 2009 3:06 pm
Re: canvas gadget
awsome love to see it
Re: canvas gadget
How does it deal with conflicting rules? Like, setting gadget 1's x to gadget 2's x + 10 and vice versa at the same time.
Edit: "place object left ie. right of reference". That makes no sense. http://en.wikipedia.org/wiki/List_of_Latin_phrases_(I)
Edit: "place object left ie. right of reference". That makes no sense. http://en.wikipedia.org/wiki/List_of_Latin_phrases_(I)
Re: canvas gadget
Rules are processed in sequence, ie. a new rule can overrule an old rule. It's silly to do so, but it would't cause issues. Unless, for example, an object points to itself, and is told to move five pixels to the left on every call, ending up in a moving objectTrond wrote: How does it deal with conflicting rules? Like, setting gadget 1's x to gadget 2's x + 10 and vice versa at the same time.

You are right. I think. I'll have a look at that, should probably be 'or' depending on the context.Edit: "place object left ie. right of reference". That makes no sense. http://en.wikipedia.org/wiki/List_of_Latin_phrases_(I)
I just uploaded the file. Though it may look cumbersome it's actually rather easy to implement into existing code, see the included samples.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )