VintaSoft Imaging .NET SDK and Plug-ins Discussions
Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.
Board index < VintaSoft Imaging < VintaSoft Imaging .NET SDK and Plug-ins Discussions
1) It would be nice to have the viewer (optionally) use some type of interpolation when zooming below 1:1 size, This will reduce jaggies and improve the appearance. For 1-bit images, this is usually called "scale to grey" but the same can be said of colour images as well. It's probably equivlent to using the GDI+ Graphics.DrawImage method with a higher-quality InterpolationMode selected, though for 1-bit images a custom implementation would probably be better & faster.Ok, we will add these features to new version of library.
2) I would like to be able to change the Cursor that a selection (or maybe: any visual tool) uses at any time, so I can indicate visually that a different operation will be performed. For example: pressing CTRL might change to a magnifier with a minus sign in it whereas without CTRL it display a magnifier with a + sign, just like Adobe Acrobat reader.
3) An event that fires when the user releases the button after making a selection would be great.Please see the SelectionChanged event of the SelectionBase class in documentation.
4) Following on from 3): ZoomSelection might have an option so that the zoom happens immediately on releasing the button instead of when you click in the region.Please see the Zoom method of the ZoomSelection class in documentation. Zoom process can be controlled programmatically.
5) Being able to programatically set/clear the section rectangle would be great. Currently I can only clear it by changing CurrentTool.Please see the Rectangle property of the SelectionBase class in documentation. This property can be changed
While on the subject, a ZoomSelection(Rectangle r) method might also be nice, where I can pass in a Rectangle (in screen or image coordinates?) and it'll try zoom to that rectangle. Again, that's based on that same code you already have for the ZoomSelection tool, but can be invoked completely programatically without using visual tools or me calculating zoom factors etc.You can use the following code instead of ZoomSelection(Rectangle r) method:
ZoomSelection selection = imageViewer1.CurrentTool as ZoomSelection;
if (selection != null)
{
selection.Rectangle = new Rectangle(100, 100, 50, 50);
selection.Zoom();
}
I assume you have methods to convert points and rectangles in screen coordinates (pixels) to/from image coordinates (taking into account things such as the current AutoscrollPosition, Zoom and DPI's)...? Can you guys possibly expose some of these so we can do those mappings easily as well?Please give me an example how do you plan to use this.
This fires each time the mouse moves while the button is still down, not when the mouse is released and the selection is thereby "fixed". Maybe just needs an event fired in the Mouse Up event where you'd presumably also be changing some status to stop the selection tracking.Event occurs when selection rectangle is changed. Mouse Up event does not change selection rectangle.
I did try that: the debugger shows it's accepting the new Rectangle value but the selection in the viewer is still displaying the old rectangle (must I do something to make it "catch up"?).What code do you use? Please try to use this:
SelectionBase selection = imageViewer1.CurrentTool as SelectionBase;
if (selection != null)
{
selection.Rectangle = new Rectangle(100, 100, 200, 300);
}
I also presume the idea is one should assign Rectangle.Empty to clear it completely?Yes, selection will be cleared if you set value of the Rectangle property to Rectangle.Empty.