Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

RasterMagnifyGlass as a Flashlight
Started by mbsiehs at 02-29-2008 13:40. Topic has 8 replies.

Print Search « Previous Thread Next Thread »
  02-29-2008, 13:40
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 50 Posts
Joined on 09-27-2007
Posts 32
RasterMagnifyGlass as a Flashlight
Reply Quote
I have a class that extends RasterMagnifyGlass whose purpose is to redraw the portion of the image covered by the RasterMagnifyGlass with a greater PaintIntensity than normal (essentially, a flashlight).  The control has worked in the past, but for some reason it is no longer working.  It works by overriding the OnPaintImage() method of RasterMagnifyGlass and do the following:

1.    Define the region to be painted by creating the appropriate GraphicsPath (in this case, a circle around the current mouse position).
2.    Set local variables to hold Viewer.Image.PaintIntensity, Viewer.Image.PaintContrast and Viewer.Image.PaintGamma
3.    Set the same three Viewer.Image properties to whatever I want on the flashlight.
4.    Set the clip of the Graphics object (argument to OnPaintImage()) to the previously defined GraphicsPath.
5.    Call Viewer.Image.Paint() with the Graphics path with the clip set.
6.    Reset the three Viewer.Image properties to what they were before I started.

I also call DisableEvents() and EnableEvents() before and after I set the three major Image properties.

Sometime in the past six months this has broken without the file being touched.  I imagine this is a pretty common functionality – any thought as to why?

Thanks for your time.
Matt

Leadtools.WinForms 15.0.0.15
.NET 2.0


   Report 
  03-02-2008, 8:59
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: RasterMagnifyGlass as a Flashlight
Reply Quote

Did you re-download the toolkit or obtain new patches recently?

If you had certain functionality working with an older build of LEADTOOLS and it stopped working with the latest patches, please send us a small test harness (not your full application) that shows this functionality and we will check it and possibly report it to our engineers.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  03-04-2008, 8:57
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 50 Posts
Joined on 09-27-2007
Posts 32
Re: RasterMagnifyGlass as a Flashlight

Attachment: FlashlightDemo.zip
Reply Quote
Thanks for the quick reply.

I have downloaded a recent version of the toolkit, but I'm not convinced that I didn't alter a dependency or something like that outside of the Flashlight file which renders the Flashlight object ineffective.  The Flashlight file is the original file.

Attached is a sample C# app to demonstrate what I'm trying to do.  I've removed the Leadtools dlls, but those that need to be added to the project (and their version) are listed below.  Again, the idea is to extend magnify glass so that I can redraw just the Region identified by the path.  The interesting thing is that if I set the RasterImageViewer's Image.PaintIntensity to 500 when the image is loaded from disk, the Flashlight (which has brightness of 500) will work, but with a brightness of 0.

I have also attached an X-Ray (R3.bmp) for viewing.

Thanks again for your time.
Matt

Leadtools.Codecs.Bmp.dll (15.0.0.2)
Leadtools.Codecs.Cmp.dll (15.0.0.3)
Leadtools.Codecs.dll (15.0.0.18)
Leadtools.dll (15.0.0.32)
Leadtools.Winforms.CommonDialogs.File.dll (15.0.0.13)
Leadtools.Winforms.dll (15.0.0.15)

   Report 
  03-05-2008, 10:53
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
I have received your files and currently testing the issue. I will get back to you as soon as possible with my results.


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  03-06-2008, 11:46
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
I checked your project and saw that the paint properties are not being taken into consideration when drawing the clipped area. I tried to find a workaround by using a secondary RasterImageViewer, but so far it didn't work. I will try some more and either send you a solution, or report it our engineers.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  03-09-2008, 11:13
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
I have reported this issue to our engineers under incident number 6755AMN. If you would like to ask about the status in the future please refer to the incident number. I will also notify you as soon as out engineers address the issue.


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  03-11-2008, 7:59
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 50 Posts
Joined on 09-27-2007
Posts 32
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
Thanks for the update and for looking into this for me.

Matt

   Report 
  06-23-2008, 11:00
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
Incident 6755AMN has been marked as not a bug. Our engineers added that this is a limitation when using RasterPaintEngine.GdiPlus.  You should use RasterPaintEngine.GdiPlus2 and the problem will not appear.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  06-24-2008, 15:45
mbsiehs is not online. Last active: 6/24/2008 8:44:40 PM mbsiehs

Top 50 Posts
Joined on 09-27-2007
Posts 32
Re: RasterMagnifyGlass as a Flashlight
Reply Quote
Thanks.  That worked.

Matt

   Report 
Post
LEAD Support Fo... » Developer » DotNet » RasterMagnifyGlass as a Flashlight

Powered by Community Server, by Telligent Systems