void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& image, const Rect& src, Color color) { Image img = IsNull(color) ? image : SetColorKeepAlpha(image, color); RectPath(x, y, cx, cy); double sw = (double)cx / src.GetWidth(); double sh = (double)cy / src.GetHeight(); Fill(img, Xform2D::Scale(sw, sh) * Xform2D::Translation(x - sw * src.left, y - sh * src.top)); }
virtual Image Make() const { return SetColorKeepAlpha(img, color); }