[SDK][INCLUDE] Move Gdiplus::TextureBrush codes (#2208)

Move the code into the place it should be in. CORE-16585
This commit is contained in:
Katayama Hirofumi MZ 2019-12-31 17:53:35 +09:00 committed by GitHub
parent f944f3a6cd
commit 1a3c77dc2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 65 deletions

View file

@ -377,6 +377,13 @@ class Image : public GdiplusBase
Image(const Image &);
Image &
operator=(const Image &);
// get native
friend inline GpImage *&
getNat(const Image *image)
{
return const_cast<Image *>(image)->nativeImage;
}
};
class Bitmap : public Image
@ -1446,63 +1453,6 @@ class CustomLineCap : public GdiplusBase
}
};
inline TextureBrush::TextureBrush(Image *image, WrapMode wrapMode, const RectF &dstRect)
{
GpTexture *texture = NULL;
lastStatus = DllExports::GdipCreateTexture2(
image->nativeImage, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, Rect &dstRect, ImageAttributes *imageAttributes)
{
GpTexture *texture = NULL;
GpImageAttributes *attrs = imageAttributes ? imageAttributes->nativeImageAttr : NULL;
lastStatus = DllExports::GdipCreateTextureIA(
image->nativeImage, attrs, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, WrapMode wrapMode, INT dstX, INT dstY, INT dstWidth, INT dstHeight)
{
GpTexture *texture = NULL;
lastStatus =
DllExports::GdipCreateTexture2I(image->nativeImage, wrapMode, dstX, dstY, dstWidth, dstHeight, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, WrapMode wrapMode, REAL dstX, REAL dstY, REAL dstWidth, REAL dstHeight)
{
GpTexture *texture = NULL;
lastStatus =
DllExports::GdipCreateTexture2(image->nativeImage, wrapMode, dstX, dstY, dstWidth, dstHeight, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, RectF &dstRect, ImageAttributes *imageAttributes)
{
GpTexture *texture = NULL;
GpImageAttributes *attrs = imageAttributes ? imageAttributes->nativeImageAttr : NULL;
lastStatus = DllExports::GdipCreateTextureIA(
image->nativeImage, attrs, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, WrapMode wrapMode)
{
GpTexture *texture = NULL;
lastStatus = DllExports::GdipCreateTexture(image->nativeImage, wrapMode, &texture);
SetNativeBrush(texture);
}
inline TextureBrush::TextureBrush(Image *image, WrapMode wrapMode, const Rect &dstRect)
{
GpTexture *texture = NULL;
lastStatus = DllExports::GdipCreateTexture2I(
image->nativeImage, wrapMode, dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height, &texture);
SetNativeBrush(texture);
}
inline Image *
TextureBrush::GetImage() const
{