Image Plugin - Simple drawing pane

Questions about NeoBook PlugIns

Moderator: Neosoft Support

UltraVox
Posts: 469
Joined: Sat Jul 28, 2007 11:14 am
Location: France

Re: Image Plugin - Simple drawing pane

Post by UltraVox »

Thank you Hans,

While you write your message, I actually found the solution of the second rectangle outside of the application. it works very well !

The problem now is :

I load a PNG image with transparent properties, but after saving, the transparency is lost (transparent becomes white). Do you know why ?

In all cases this plugin provides many important things for me ;)

Thank you again!
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 »

I load a PNG image with transparent properties, but after saving, the transparency is lost (transparent becomes white). Do you know why ?
Because hpwImage is a 24 bit Image component. So it can not support a true 8 bit Alpha channel which would need 32 bit.

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 »

Okay, thank you for this info!
David de Argentina
Posts: 1596
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina
Contact:

Re: Image Plugin - Simple drawing pane

Post by David de Argentina »

Hi Hans-Peter

I am using your plugin to show some trigonometric functions and equations.
In fact, all works fine.

I have some issues about the location of the 0,0 point.

I'm doing some neobook calculations, in order to recreate the coordinates of the points correctly.

I think, if you could add some declarations like:

Setvar "[HpwImageOriginPoint] "TopLeft"
Setvar "[HpwImageOriginPoint] "BottonLeft"
Setvar "[HpwImageOriginPoint] "TopRight"
Setvar "[HpwImageOriginPoint] "BottonRight"
Setvar "[HpwImageOriginPoint] "Center"

It could be a goal, because NeoBook would not waste time in calculate real coordinates.
Remember Neobook is not the fastest compiler to do this kind of job...

Is this possible ?

Thanks in advance,
David de Argentina
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 David,
Is this possible ?
Might be, but only with a massiv rewrite of each drawing command.
You know that the coordinate system is the one used everywhere in Windows and neobook.
You may also define 2 offset-variables and use it in every of your draw-commands.
Not sure how much performane this math on the arguments costs.

When you are in need for performance you might consider using the direct call Interface from a plugin programming language (one that can import dll-functions). I use this from newLisp, so you may have a look at the sample Pub.

So currently I have no plans to do this. Sorry.

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.61:

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

Action: hpwImagePickColor - Pick a color from a point from the complete desktop.(like the picker in hpwColorCircle)

Variable: [hpwColorBoxPosLeft] - Allows to set the Position of the hpwColorBox.
Variable: [hpwColorBoxPosTop] - Allows to set the Position of the hpwColorBox.

Variable: [hpwColorCirclePosLeft] - Allows to set the Position of the hpwColorCircle.
Variable: [hpwColorCirclePosTop] - Allows to set the Position of the hpwColorCircle.

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.62:

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

Action-Variable: [RectangleName_PickColorOnChange] - Allows an action to process the color under the pipette-cursor when moving.

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.63:

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

Variable: [hpwImagePopupAutoPopup] - Allows to disable the right-click popup activation.
Action: hpwImageShowPopup - Show the popupmenu of the image.

hpwImageShowPopup allows the call from the popup from anywhere, a button or any of the click-events.

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.64:

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

Variable: [hpwImageWmfUseGdiPlus] - When set to 1 it enables antialias drawing with GdiPlus on WMF-Loading.

For a project I need to convert WMF-Lineart to small but antialiased bitmaps.
So I research different algorithems about antialiasing, but was not satisfied until I ran across drawing via the GdiPlus-windows lib.
Solutions does not work for all WMF stuff. WMF with text seems not to draw fine. But lineart gets crisp drawn.

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 tested on my win7tablet.
There it seems not make a difference with activated GdiPlus.
So it works on XP which is still my development System.

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 »

Hello,

I noticed another side-effekt when using the GdiPlus: Jpg save is broken. So use 2.63 when you need jpf save.
I am thinking about splitting the version into a special GdiPlus-version and revert back the standard hpwImage.
On WIN7 I found aout that when I provide the latest GdiPlus.dll from my xp-system in the app-folder, then it works also there.

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.64a zip:

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

hpwImage reverted back to Non-GDI, a seperate hpwImageGdi.nbp/nbr is provided with dependency to GdiPlus.dll
hpwImageGdi.nbp/nbr problem with jpg-save is fixed.

Only one of the both flavours can be installed in neobook!

Regards
Hans-Peter
Locked