Options used by this viewer when rendering RasterImage objects.
public virtual RasterPaintProperties PaintProperties { get; set; }
Public Overridable Property PaintProperties() As RasterPaintProperties
Get
Set
public:
virtual property RasterPaintProperties^ PaintProperties
{
RasterPaintProperties^ get()
void set(RasterPaintProperties^ value)
}
The options used by this viewer when rendering RasterImage objects.
The ImageViewer will create an instance of RasterPaintProperties and sets it in PaintProperties upon initialization. It will then use this instance to render any RasterImage instance or their regions.
The viewer creates an instance using RasterPaintProperties.Default and then modifies the values as follows:
Value | Description |
---|---|
RasterPaintProperties.PaintEngine | Set to RasterPaintEngine.GdiPlus |
RasterPaintProperties.PaintDisplayMode | Set to RasterPaintDisplayModeFlags.Resample ORed with RasterPaintDisplayModeFlags.ScaleToGray |
These options will provide optimal viewing experience for any type of images, color and bitonal. After that, the ImageViewer will use Paint(RasterImage,Graphics,LeadRect,RasterPaintProperties) objects into the surface of the viewer.
RasterPaintProperties is a value type (structure), and hence, you cannot change the values directly by modifying the PaintProperties property. Instead, you should save the value into a temporary variable, modify it and then set it back:
// Turn on Bicubic instead of Resample for colored images
RasterPaintProperties paintProperties = viewer.PaintProperties;
paintProperties.PaintDisplayMode = RasterPaintDisplayModeFlags.Bicubic | RasterPaintDisplayModeFlags.ScaleToGray;
viewer.PaintProperties = paintProperties;
Important: RasterPaintEngine, setting the engine value to anything other than RasterPaintEngine.GdiPlus will have no effect and the viewer will still internally use GDI+ to render the images. This is required because the viewer relies on setting a transform matrix in System.Drawing.Graphics to translate, scale and rotate the images. This is not supported when the paint engine uses Windows API native StretchBlt function.
Products |
Support |
Feedback: PaintProperties Property (ImageViewer) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.