Layer.operateStretch

機能/意味
Scaling operation synthesis
タイプ
Layerクラスのメソッド
構文
operateStretch(dleft, dtop, dwidth, dheight, src, sleft, stop, swidth, sheight, mode=omAuto, opa=255, type=stNearest, option=-1.0)
引数
dleft  Specifies the left edge position of the destination rectangle in pixels (at the image position of the destination layer).
dtop  Specifies the top position of the destination rectangle in pixels (at the image position of the destination layer).
dwidth  Specifies the width of the destination rectangle in pixels (at the location of the destination layer image).
dheight  Specifies the vertical width of the destination rectangle in pixels (at the image position of the destination layer).
src  Specify the layer object to be superimposed.
 Bitmap class objects can also be specified. (1.1.0 or later)
sleft  Specifies the left edge of the rectangle to be overlaid in pixels (at the image position of the overlay source layer).
stop  Specifies the top position of the rectangle to be overlaid in pixels (at the image position of the overlay source layer).
swidth  Specifies the width of the overlapping rectangle in pixels (at the image position of the source layer).
sheight  Specifies the vertical width of the rectangle to be overlaid in pixels (at the image position of the overlay source layer).
mode  Specify the operation mode.
If omAuto is specified, the type of operation will be automatically determined according to the Layer.type properties of the source layer.
When omPsNormal is specified, Photoshop compatible alpha composition is performed (implemented in 1.3 or later except stNearest and stFastLinear).
If omPsAdditive is specified, dodging (linear) composition compatible with Photoshop will be performed (implemented in other than stNearest and stFastLinear in 1.3 or later).
If omPsSubtractive is specified, Photoshop compatible burn-in (linear) synthesis is performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsMultiplicative is specified, Photoshop compatible multiplication and synthesis will be performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsScreen is specified, screen composition compatible with Photoshop will be performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsOverlay is specified, overlay composition compatible with Photoshop will be performed. (In 1.3 or later, implemented with other than stNearest and stFastLinear.)
If omPsHardLight is specified, Photoshop compatible hard light composition is performed (implemented in 1.3 or later except stNearest and stFastLinear).
If omPsSoftLight is specified, Photoshop compatible soft light composition will be performed (implemented in 1.3 or later except stNearest and stFastLinear).
If omPsColorDodge is specified, dodge color composition compatible with Photoshop is performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsColorDodge5 is specified, dodging color composition compatible with Photoshop version 5.x or less is performed (implemented in 1.3 or later except stNearest and stFastLinear).
If omPsColorBurn is specified, Photoshop-compatible burn-in color composition is performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsLighten is specified, Photoshop compatible comparison (bright) composition will be performed (implemented in 1.3 or later except stNearest and stFastLinear).
When omPsDarken is specified, comparison (dark) composition compatible with Photoshop is performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omPsDifference is specified, the absolute value of the difference compatible with Photoshop will be synthesized (Since 1.3, it is implemented by other than stNearest and stFastLinear).
If omPsDifference5 is specified, the absolute value of the difference in compatibility with Photoshop version 5.x or lower will be synthesized.
If omPsExclusion is specified, Photoshop compatible exclusion synthesis will be performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
When omAdditive is specified, addition synthesis is performed (implemented in other than stNearest and stFastLinear in 1.3 or later).
If omSubtractive is specified, subtraction synthesis is performed (implemented in other than stNearest and stFastLinear in 1.3 and later).
When omMultiplicative is specified, multiplication and synthesis are performed (implemented in other than stNearest and stFastLinear in 1.3 or later).
If omDodge is specified, dodging synthesis is performed. (In 1.3 or later, implemented by other than stNearest and stFastLinear.)
If omDarken is specified, comparison (dark) synthesis will be performed (implemented in other than stNearest and stFastLinear in 1.3 or later).
If omLighten is specified, comparison (light) synthesis is performed (implemented in 1.3 and later except stNearest and stFastLinear).
If omScreen is specified, screen multiplication is performed. (Since 1.3, it is implemented by other than stNearest and stFastLinear.)
If omAlpha is specified, alpha synthesis will be performed.
If omAddAlpha is specified, additive alpha synthesis is performed. In this case, when the destination Layer.face property is dfOpaque and the Layer.holdAlpha property is false, linear interpolation can be performed by specifying stFastLinear in the type argument.
If omOpaque is specified, the alpha information of src is ignored, and src is always assumed to be completely opaque. In this case, when the destination Layer.face property is dfOpaque and the Layer.holdAlpha property is false, linear interpolation can be performed by specifying stFastLinear in the type argument.
opa  Specifies the strength of the operation (0-255).
type  Specifies the type of scaling.
stNearest : Nearest neighbor method is used
stFastLinear : Low-precision linear interpolation is used (partially implemented)
stSemiFastLinear : Fixed decimal linear interpolation is used (since 1.3)
stLinear : Linear interpolation is used (implementation change since 1.3)
stFastCubic : Fixed decimal 3D interpolation is used (since 1.3)
stCubic : Three-dimensional interpolation is used (implementation change since 1.3)
stFastLanczos2 : Fixed decimal area Lanczos interpolation range 4x4 is used (since 1.3)
stLanczos2 : Lanczos interpolation range 4x4 is used (since 1.3)
stFastLanczos3 : Fixed decimal area Lanczos interpolation range 6x6 is used (since 1.3)
stLanczos3 : Lanczos interpolation range 6x6 is used (since 1.3)
stFastSpline16 : Fixed decimal spline interpolation 4x4 is used (since 1.3)
stSpline16 : 4x4 spline interpolation is used (since 1.3)
stFastSpline36 : Fixed decimal spline interpolation 6x6 is used (since 1.3)
stSpline36 : 6x6 spline interpolation is used (since 1.3)
stFastAreaAvg : Fixed decimal area average reduction is used. Cannot be expanded (since 1.3)
stAreaAvg : Area average reduction is used. Cannot be expanded (since 1.3)
stFastGaussian : Fixed decimal Gaussian interpolation 4x4 is used (since 1.3)
stGaussian : Gaussian interpolation 4x4 is used (since 1.3)
stFastBlackmanSinc : Fixed-point Blackman-Sinc interpolation 8x8 is used (since 1.3)
stBlackmanSinc : Blackman-Sinc interpolation 8x8 is used (1.3 or later)
 The speed is higher in the order of stNearest> stFastLinear> stLinear> stCubic, but the higher the speed, the lower the quality.
The interpolation method after stCubic is sufficiently high quality and it can be said that it is a difference of preference.
However, Gaussian interpolation results in blurry image quality.
The difference between stFastLinear and other linear interpolations (stSemiFastLinear and stLinear) is significant when reducing.
stFastLinear always refers to the surrounding four pixels, whereas stSemiFastLinear and stLinear refer to and interpolate a range in which the affected area at equal magnification is 4 pixels when reducing, that is, a wider range of pixels. Higher image quality (algorithm is the original linear interpolation algorithmically).
 For stFastLinear, stRefNoClip can be additionally specified by bitwise OR, and in this case, it is permitted to refer to outside the area of the bitmap to be copied and synthesize the color. If this is not specified, there will be no reference outside the range of the source bitmap, even if there is room around the source bitmap. Is considered a color).
option  Added since 1.3.
 Sharpness for 3D interpolation. Other interpolation methods currently have no meaning.
 Increasing the sharpness value in the positive direction blurs the image, and increasing the value in the negative direction increases the sharpness.
戻り値
なし (void)
説明
 Performs arithmetic synthesis on the rectangle of the specified overlay source layer with the rectangle of the overlay destination (layer on which the method is executed). If the size of the source rectangle and the destination rectangle are different, the size is enlarged or reduced.
 When omAuto is specified for mode, the type of operation is automatically determined according to the Layer.type property of the source layer.