Layer.stretchCopy

機能/意味
Scaling copy
タイプ
Layerクラスのメソッド
構文
stretchCopy(dleft, dtop, dwidth, dheight, src, sleft, stop, swidth, sheight, type=stNearest, option=-1.0)
引数
dleft  Specifies the left edge of the destination rectangle in pixels (at the image location of the destination layer).
dtop  Specifies the top edge of the destination rectangle in pixels (at the image location of the destination layer).
dwidth  Specifies the width of the destination rectangle in pixels (at the image location of the destination layer).
dheight  Specifies the height of the destination rectangle in pixels (at the image location of the destination layer).
src  Specify the copy source layer object.
 Bitmap class objects can also be specified. (1.1.0 or later)
sleft  Specifies the left edge of the rectangle to be copied in pixels (at the image position of the source layer).
stop  Specifies the top edge of the rectangle to be copied in pixels (at the image position of the source layer).
swidth  Specifies the width of the rectangle to be copied in pixels (at the image position of the source layer).
sheight  Specifies the height of the rectangle to be copied in pixels (at the image position of the source layer).
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)
説明
 Copies the specified rectangle of the copy source layer to the rectangle of the copy destination (layer on which the method is executed). If the size of the source rectangle and the destination rectangle are different, enlargement or reduction is performed.
 In the current version, linear interpolation is effective when stFastLinear is specified when the Layer.face property of the layer to be overlaid (executing the method) is dfAlpha (or dfBoth) or dfAddAlpha. Also, when the Layer.face property is dfOpaque and the Layer.holdAlpha property is false, linear interpolation is possible.
 Also, in the current version, stLinear or stCubic is valid only when the destination rectangle does not extend beyond the layer without horizontal / vertical flip.
 If the Layer.face property of the destination layer (executing the method) is dfAlpha (or dfBoth) or dfAddAlpha, both the main and mask images are copied.
 For dfOpaque (or dfMain), if the Layer.holdAlpha property is true, only the main image will be copied; if false, both the main image and the mask image will be copied.