Image Plugin - Simple drawing pane

Questions about NeoBook PlugIns

Moderator: Neosoft Support

User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.50:

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

Bugfix: Forgotten active debug messagebox in resize-code removed.

Regards
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.51:

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

Action: hpwImageStampUpdateBuffer- Update stamp back-buffer with current image content.
Variable: [hpwImageStampButton] allows to attach the stamp action to left,right,middle and double click.
Variable: [hpwImageStampSnapColor] is set to the snap-color
Variable: [hpwImageStampSnapDistance] is set to the distance from cursor-pos where snap color is searched.
Variable: [RectangleName_StampNoColorSnapAction] action is fired when no snap point is found.
Variable: [RectangleName_StampAction] action is fired when a stamp-event has happend.

See sample pub page 6 button 'Snap Stamp'.
Different click-mode was needed on tablets where a fingermove acts liks a left click.
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.52:

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

Action: hpwImageGetBoundery - Find the rectangle-boundery of a bitmap inside a area with backgroundcolor.
Variable: [Rectanglename_StampX] stores the xpos of the color snap point.
Variable: [Rectanglename_StampY] stores the ypos of the color snap point

Regards
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new zip of hpwImage 2.52:

Bugfix: hpwImageGetBoundery was not working with other then white background. Always return the whole image size values.

So please download it again.
Sorry for any double work.

Regards
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.53:

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

Action: hpwImageStamp - Places a stamp by code on an image.
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.54:

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

Bugfix: hpwImageLoadStamp - Had a memory-leak when using TIF/STW from embedded filesystem
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Hello,

I want to notice that hpwImage support for neopaint's STW format is neopaint 4 only.

Details here:
viewtopic.php?f=12&t=19902&p=11209636#p11209636

You may use PNG instead.

Regards

Hans-Peter
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.55:

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

hpwScrollbar now resizes with its rectangle.
(Updating [RectangleName_MaxX]+[RectangleName_MaxY])
Hans-Peter
User avatar
Cipolla
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by Cipolla »

Hans-Peter,

I'm very pleased to hear that! :D
Greetings from Germany
Klaus
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Just upload a new hpwImage 2.56:

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

Recompiled with updated Png-Library (Fix for hpwSimpleGraph)

Regards
Hans-Peter
UltraVox
Posts: 469
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Image Plugin - Simple drawing pane

Post by UltraVox »

Recompiled with updated Png-Library (Fix for hpwSimpleGraph)
hpwSimpleGraph now supports PNG format ?
Great news!

I am actively looking for a plugin capable of displaying .DDS (Direct Draw Surface) images files. Currently no plugin can do that. Do you know how to integrate this functionality into hpwImage ? Note that I do not want to convert and display, but just displaying image.dds in my NeoBook application.
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Hello,

As Dec said in the other thread: Dds is not so popular so even GraphicEx does not support it.
So it has to be researched if some Delphi code is available and how much it would add to the plugin.
And is it worth to do this effort?

Regards
Hans-Peter
UltraVox
Posts: 469
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Image Plugin - Simple drawing pane

Post by UltraVox »

This is the only feature missing in my program : Displaying .DDS files !
Make a 3D software without DDS is like riding a bike without wheels :|

DDS files you do not seem popular, but without them, there would be no video game!

This is my dilemma.
I'll let you judge whether the effort is worth it ...
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Image Plugin - Simple drawing pane

Post by HPW »

Hello,

I was asked how to draw freehand with hpwImage:

Make a new button on page 7 of the demo and paste the following code into it:

Code: Select all

hpwImageCreate "RGetAreaImage" "SetVar [#34][#91]DrawOnMove[#93][#34] [#34]0[#34]" " " "" "If [#34][#91]DrawOnMove[#93][#34] [#34]=[#34] [#34]1[#34][#13][#10] hpwImagePixels [#34]RGetAreaImage[#34] [#34]RGetAreaImage_MoveX[#34] [#34]RGetAreaImage_MoveY[#34] [#34]clRed[#34][#13][#10]Endif[#13][#10]" "SetVar [#34][#91]DrawOnMove[#93][#34] [#34]1[#34]" "" ""
Make another new button on page 7 of the demo and paste the following code into it:

Code: Select all

hpwImageCreate "RGetAreaImage" "SetVar [#34][#91]DrawOnMove[#93][#34] [#34]0[#34]" " " "" "If [#34][#91]DrawOnMove[#93][#34] [#34]=[#34] [#34]1[#34][#13][#10] hpwImageDrawLine [#34]RGetAreaImage[#34] [#34][#91]LastX[#93][#34] [#34][#91]LastY[#93][#34] [#34]RGetAreaImage_MoveX[#34] [#34]RGetAreaImage_MoveY[#34] [#34]clRed[#34] [#34][#34] [#34]psSolid[#34][#13][#10] SetVar [#34][#91]LastX[#93][#34] [#34]RGetAreaImage_MoveX[#34][#13][#10] SetVar [#34][#91]LastY[#93][#34] [#34]RGetAreaImage_MoveY[#34][#13][#10]Endif[#13][#10]" "SetVar [#34][#91]DrawOnMove[#93][#34] [#34]1[#34][#13][#10]SetVar [#34][#91]LastX[#93][#34] [#34]RGetAreaImage_LDownX[#34][#13][#10]SetVar [#34][#91]LastY[#93][#34] [#34]RGetAreaImage_LDownY[#34][#13][#10]" "" ""
The first uses hpwImagePixels and makes gap when moving fast.
The second uses hpwImageDrawLine and draw a series of lines.

Regards
Hans-Peter
schmutly
Posts: 217
Joined: Fri Feb 20, 2009 4:16 pm

Re: Image Plugin - Simple drawing pane

Post by schmutly »

Perfect :D Method 2 was great but first could be useful too.
Thanks you very much Hans, that's great.
Just need to study what you did.
Rob
Locked