Loading...

Drawing speed seems slower with transparent backstyle

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

Drawing speed seems slower with transparent backstyle

Postby louis » Wed Mar 31, 2010 4:22 pm

Hi,

In my program, I draw some lines with mainly the Drawline (imaging) and Redraw (viewer) methods, like in the sample 'Real time line drawing'. But the viewer is set as transparent because there is a drawing in the background in a Cnt viewer.
Both viewers have the same image size, based on the image of the back drawing.
When this size is large (let's say 1400x970 mm !), the draw process is quite long even if the fore image is mainly empty.
If I change the backstyle of the fore viewer to 1, the drawing speed is higher and correct but I can't see the back drawing ...

So, my question is : is there a way to increase the speed in that case ?

Other possibility : instead of using a fore viewer, is it possible to draw lines on a non-homogeneous backcolor with a pixel color change process ? I mean something like new color = f(old color), or something like the DrawMode in VB6.

Louis
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm

Re: Drawing speed seems slower with transparent backstyle

Postby Loïc » Thu Apr 01, 2010 4:16 pm

Hi Louis,

Maybe you can try to turn the ForcePictureMode property to true (kind of double buffer mode). But I am not sure you will increase performances :(

Unfortunately we do not provide a way to control the pen behavior in the current release. A workaround can consist to use GDI API on The viewer HDC but this need some investigation & knowledge on this API.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Drawing speed seems slower with transparent backstyle

Postby louis » Thu Apr 01, 2010 5:05 pm

Hi Loic,

Finally, I have found another solution, but that's a little bit complex to explain it in a few words. We have to know the application, or to be very concentrated ... !
Anyway, I make a summary, that may be useful for the members of the forum even if it is related to a special need. Here it is :

I need to draw simple lines on a drawing and to erase a part of them like with an eraser. So I use 2 viewers as explained before, with the same width and height, and the same image size and zoom value in order to scroll or zoom them in the same time.
To avoid the slowness (maybe very high-perf computers solve that ?) due to the image size and the transparent background of the fore viewer, I choose a reduced size for the fore image (which is fully white before I draw the lines) and a different zoom. For example, I use an image width and height divided both by 4 and a zoom multiplied by 4.
As the lines do not need a high precision, that is very acceptable.

Louis
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm

Re: Drawing speed seems slower with transparent backstyle

Postby Loïc » Thu Apr 01, 2010 5:17 pm

Hi Louis,

Thank you very much for your interesting feedback.
I think I understood your solution. A kind of image masking based on GdViewer layers.

This give me some ideas :)


With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron