Re: RasterMagnifyGlass as a Flashlight
Started by mbsiehs at 02-29-2008 13:40. Topic has 8 replies.
|
|
02-29-2008, 13:40
|
mbsiehs
Joined on 09-27-2007
Posts 32
|
RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
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-04-2008, 8:57
|
mbsiehs
Joined on 09-27-2007
Posts 32
|
|
|
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

Joined on 08-13-2006
Posts 1,082
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
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

Joined on 08-13-2006
Posts 1,082
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
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

Joined on 08-13-2006
Posts 1,082
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
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
Joined on 09-27-2007
Posts 32
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
Thanks for the update and for looking into this for me.
Matt
|
|
|
|
|
Report
|
|
|
|
06-23-2008, 11:00
|
Qasem Lubani

Joined on 08-13-2006
Posts 1,082
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
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
Joined on 09-27-2007
Posts 32
|
Re: RasterMagnifyGlass as a Flashlight
|
 
 
|
|
|
|
|
|
|
LEAD Support Fo... » Developer » DotNet » Re: RasterMagnifyGlass as a Flashlight
|
|
Copyright LEAD Technologies, Inc. 2008
