Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

Free hand drawing on Picture

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Free hand drawing on Picture

Postby Nanni on Thu Sep 25, 2008 8:34 pm

Hi to everybody and sorry for English.

I have bought GdPicture Pro sdk version 5, but I have a problem.
I need to draw free hand lines with Opacity, over a background image.
I have looked at your example, but it don't look good when you use Opacity.

Try to set PenSize and Alpha Value to 50.
The traced line doesn't have continuity and doesn't maintain the same opacity.

How I can solve this problem?
Can I store coordinates and draw the line with the opacity subsequently?
How to achieve this? ... or there is a better solution?

Thanks for Help

Best regards
Nanni
Nanni
 
Posts: 11
Joined: Thu Sep 25, 2008 7:26 pm

Re: Free hand drawing on Picture

Postby Tom Moran on Fri Sep 26, 2008 5:29 am

Hi Nanni:

If you are using that big a pen width (50) then you probably don't want to use free hand draw. What happens is that if you press and hold down your mouse key with the free hand draw code it keeps writing over and over and therefore you don't really have any opacity.

Why don't you use DrawRectangle or DrawRoundedRectangle or DrawEllipse instead? It will only apply the draw one time and you'll have the opacity you want. What is it your trying to draw?

Tom
Tom Moran
 
Posts: 49
Joined: Thu May 24, 2007 10:41 am
Location: Phoenix, Arizona

Re: Free hand drawing on Picture

Postby Nanni on Fri Sep 26, 2008 10:20 am

Hi Tom
Thanks for reply.

I am trying to simulate fiber tip pen which is used to highlight sections of documents.
I need to Draw Free hand line for this.

If you try to draw also with small Pen (5) default size and zoom the picture,
you will see that the traced line doesn't have continuity on the curve.

Thanks for Help

Best regards
Nanni
Nanni
 
Posts: 11
Joined: Thu Sep 25, 2008 7:26 pm

Re: Free hand drawing on Picture

Postby Tom Moran on Sat Sep 27, 2008 8:29 pm

Hi Nanni:

I see your dilemma. I think there is a viable solution.

Most all software, including word processing as well as imaging, use a select tool for highlighting rather than a pen tool. For example, in Microsoft Word you can highlight a word or phrase using their selection tool. Once selected you then choose the highlight option to highlight the area selected. You can accomplish the same thing in gdPicturePro.

Use the select tool to select the area (SetROI) you wish highlighted. Then use one of the Draw shape commands (DrawRectangle, DrawCircle, etc.) with the color and opacity desired. When doing this I found it is helpful to also reset the Gamma on the highlighted portion of the image at the same time. I found that -40 seems to work well.

Ex: Call Imaging1.SetGammaCorrection(-40).

Hope this is helpful.

Best regards,

Tom
Tom Moran
 
Posts: 49
Joined: Thu May 24, 2007 10:41 am
Location: Phoenix, Arizona

Re: Free hand drawing on Picture

Postby Nanni on Mon Sep 29, 2008 11:39 am

Hi Tom
you are very kind.

Unfortunately my customer requires to draw signs on the page
(eg. arrows,Free Hand circle and so on),without covering completely the words.
The selection tools is not a solution for me.

but...why GDpicture Pro doesn't contain standard Draw method as in a pictureBox?

Thanks for Help

Best regards
Nanni
Nanni
 
Posts: 11
Joined: Thu Sep 25, 2008 7:26 pm

Re: Free hand drawing on Picture

Postby Nanni on Wed Oct 08, 2008 1:26 pm

Hello to all

I had a problem with freehand drawing line with opacity and GdPicturePro.
I believe to have found a possible work around , but I have a small problem.

I have need that the drawn lines become part of the GdPicture image
because I have need to use Zoom and Pan features.

I'm using BitBlt to copy the GdViewer Displayed Picture and Lines, to memory DC.

SelectObject hDCOriginal, hBmpOriginal
BitBlt hDCOriginal, 0, 0, Imaging1.GetWidth, Imaging1.GetHeight, GdViewer1.hDC, 0, 0, SRCCOPY

How to set Native image from Memory back to Imaging1?

I have enclosed a small piece of my code.


Thanks for Help

Best regards
Nanni
Attachments
TestDraw.zip
(1.38 MiB) Downloaded 11 times
Nanni
 
Posts: 11
Joined: Thu Sep 25, 2008 7:26 pm


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: CRYNER and 1 guest