Source language: Translate to:

Image Plugin - Simple drawing pane

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Re: Image Plugin - Simple drawing pane

Postby HPW » Wed Nov 20, 2013 10:12 am

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Wed Nov 20, 2013 4:59 pm

Did that & that helped to understand the process.
Thanks again Hans.
Rob
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Thu Nov 21, 2013 12:20 am

Tip: When you want to change event behaviour in an existing Image you can use hpwImageSetActions.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Thu Nov 21, 2013 12:33 am

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
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Thu Nov 21, 2013 1:46 am

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.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Thu Nov 21, 2013 2:08 am

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
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby schmutly » Thu Nov 21, 2013 9:13 pm

Hans,
How can i increase the 'drawing thickness' of mouse..is there an
option for that in hpwImage? Its one pixel at moment.
Thx
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Fri Nov 22, 2013 12:03 pm

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Fri Nov 22, 2013 4:57 pm

: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.
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Sat Nov 23, 2013 12:08 am

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby HPW » Sat Nov 23, 2013 3:23 am

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Sat Nov 23, 2013 3:32 am

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
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Sat Nov 23, 2013 3:37 am

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Image Plugin - Simple drawing pane

Postby schmutly » Sat Nov 23, 2013 3:46 am

Ah..understood.Have come across that before with some
of Davids plugins after an update.Thanks.
schmutly
 
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Postby HPW » Sat Nov 23, 2013 6:13 am

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
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

PreviousNext

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests