Page 16 of 18

Re: Image Plugin - Simple drawing pane

PostPosted: Wed Nov 20, 2013 10:12 am
by HPW
When you want to see the scripts, open the hpwImageCreate wizard and click on the action-edit button near the action field you want to see.
Then you get a readable script how it is performed in the event.

Regards

Re: Image Plugin - Simple drawing pane

PostPosted: Wed Nov 20, 2013 4:59 pm
by schmutly
Did that & that helped to understand the process.
Thanks again Hans.
Rob

Re: Image Plugin - Simple drawing pane

PostPosted: Thu Nov 21, 2013 12:20 am
by HPW
Tip: When you want to change event behaviour in an existing Image you can use hpwImageSetActions.

Re: Image Plugin - Simple drawing pane

PostPosted: Thu Nov 21, 2013 12:33 am
by schmutly
OK, thanks muchly Hans.
Also wanted to ask while i remember, i like the Inslink arrow used in the HPWSimpleGraph but
obviously i cant attach & use that in the same Image Rectangle as HpwImage.
I'm trying to 'annotate' and draw on an image (your code gave me that last night thx)
but also have an arrow image placed so i can point at some text or something in image.
Its ok, i have enough to go on and work my way through stuff you've shown me now, was checking that a feature like the
hpwSimpleGraphInsLink couldn't be utilized WITH HpwImage.
OK...you've given me some things to work on now,lots to learn and some of
the examples look real complex..i need extra coffee as i go through them :lol: .
Rob

Re: Image Plugin - Simple drawing pane

PostPosted: Thu Nov 21, 2013 1:46 am
by HPW
You can save your arrow image in a file and load it to a position in hpwImage.
Or maybe you want to use the stamp feature to visually place the arrow.

Generic scripting allows much different options.

Re: Image Plugin - Simple drawing pane

PostPosted: Thu Nov 21, 2013 2:08 am
by schmutly
Yes, i was going to use the stamp feature & then will just need to workout
how to 'rotate' it with mouse into the right angle position.
But...that's step 10 so i am not there yet, thanks for suggestions.
I'm enjoying working through this..thanks for the great
plugins.
Rob

Re: Image Plugin - Simple drawing pane

PostPosted: Thu Nov 21, 2013 9:13 pm
by schmutly
Hans,
How can i increase the 'drawing thickness' of mouse..is there an
option for that in hpwImage? Its one pixel at moment.
Thx

Re: Image Plugin - Simple drawing pane

PostPosted: Fri Nov 22, 2013 12:03 pm
by HPW
Just upload a new hpwImage 2.57:

http://www.hpwsoft.de/anmeldung/html1/n ... book5.html

Action: hpwImageDrawLine, hpwImageDrawLines and hpwImageRectangle gets an additional paramter pen-width.

Caution: Using this new version will break existing pub's because of the additional parameter. Add at least an empty parameter to get default pixel width 1.

Regards

Re: Image Plugin - Simple drawing pane

PostPosted: Fri Nov 22, 2013 4:57 pm
by schmutly
:mrgreen: Your a legend,
thank you Hans, appreciate that.
Sent a donation too..Have Good Weekend.
Robbie
ps: Can you add that option to the hpwImageFrameRect
in the next release if possible? I'm using this option to
rubber-band around text to highlight it. I looked at
how you did the scripting for the freehand drawing
and just trying to do that with the frame now, so
a thicker border for frame would be great for frame ;)
Thanks again.

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 12:08 am
by HPW
Hello,

Unfourtunatly no, I had looked at it too, but the Delphi function FrameRect does not support it.
And how would you restore the background when you move the Cursor.
hpwImageGetRectArea would do this, but is currently also only one Pixel. Have to look at it.
Thanks for the donation, happens not often.

Regards

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 3:23 am
by HPW
Just upload a new hpwImage 2.58:

http://www.hpwsoft.de/anmeldung/html1/n ... book5.html

Action: hpwImageFrameRect and hpwImageGetRectArea gets an additional paramter frame-width 1-5.

As I told the delphi FrameRect does not support a pen width.
As a workaround I implemented that it does it simply multiple times with 1 pixel. (1 - 5 supported)
Note that it work from the outer specified coordinate to the inner.
And GetRectArea will still return the outer coordinate.
Note also that hpwImageDrawLine, hpwImageDrawLines and hpwImageRectangle uses pen-width which draw to both sides of the coordinates.

Again Caution: Using this new version will break existing pub's because of the additional parameter. Add at least an empty parameter to get default pixel width 1.

Regards

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 3:32 am
by schmutly
Thanks so much Hans,
your remarkable :D
Um, can you explain what you mean by breaking the Pubs?
What do i need to look out for that would cause it to break?
I guess i am safe as i am still working my way through creating this
so all seems ok so far.
Thanks for your efforts and updates,
Robbie

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 3:37 am
by HPW
Hello,

Um, can you explain what you mean by braking the Pubs?


If you have a pub that it is using that commands, you have inserted them with the old number of parameters.
When you run them you will get an error from neobook that you have defined too less parameters.
So you have to search through your pub and add everywhere at least a empty "" parameter.

So you have to think about before installing the 2 latest versions, when you want to run/compile old pub-versions.

Regards

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 3:46 am
by schmutly
Ah..understood.Have come across that before with some
of Davids plugins after an update.Thanks.

Re: Image Plugin - Simple drawing pane

PostPosted: Sat Nov 23, 2013 6:13 am
by HPW
I noticed on my win-tablet that it is better in the Drawline-LeftDown Action to change to this code:

Code: Select all
SetVar "[LastX]" "RGetAreaImage_LDownX"
SetVar "[LastY]" "RGetAreaImage_LDownY"
SetVar "[DrawOnMove]" "1"


(From the freehand sample here in the thread)

Regards