Table of Contents

Class ScaleEffect.Props

Namespace
PaintDotNet.Direct2D1.Effects
Assembly
PaintDotNet.Windows.Core.dll
public sealed class ScaleEffect.Props : DeviceEffectProperties
Inheritance
ScaleEffect.Props
Inherited Members

Constructors

Props()

Properties

BorderMode

The mode used to calculate the border of the image, soft or hard. When BorderMode.Soft is used, the effect pads the input image with transparent black pixels for samples outside of the input bounds when it applies the convolution kernel. This creates a soft edge for the image, and in the process expands the output bitmap by the size of the kernel. When BorderMode.Hard is used, the effect extends the input image with a mirror-type border transform for samples outside of the input bounds. The size of the output bitmap is equal to the size of the input bitmap. The default value is BorderMode.Soft.

CenterPoint

The image scaling center point. The units are in DIPs. Use the center point to scale around a point other than the upper-left corner. The default value is { 0, 0 }.

ClassID

Implemented by the derived class to specify the effect's class ID (CLSID) when registering and creating the effect and for binding to an IDeviceEffectProperties.
Note that this is different than the ID property accessor, which queries the IDeviceEffectProperties for the actual runtime effect class ID.
Overriding this property is only necessary in advanced scenarios, such as when wrapping an existing effect (e.g. built-in Direct2D effects), or when working with CustomEffects that have their own generic type arguments (e.g. PixelShaderEffect).

Input
InterpolationMode

The interpolation mode the effect uses to scale the image. There are 6 scale modes that range in quality and speed. The default value is ScaleInterpolationMode.Linear.

Scale

The scale amount in the X and Y direction as a ratio of the output size to the input size.
The scale amounts are unitless and must be non-negative.
The minimum value is { 0.01f, 0.01f }. The default value is { 1, 1 }.

Sharpness

In the high quality cubic interpolation mode, the sharpness level of the scaling filter as a float between 0 and 1.
The values are unitless. You can use sharpness to adjust the quality of an image when you scale the image down.
The sharpness factor affects the shape of the kernel. The higher the sharpness factor, the smaller the kernel.
The default value is 0.