CodePudding user response:
A curve approach is to first converted to bitmap, and then processing, ha haCodePudding user response:
Turned BMP transparent effect would not be in, mainly to take transparent effectCodePudding user response:
Calling the TPNGImageCodePudding user response:
@ OptPhantom call TPNGImage how? How to buckle the part of the figure?CodePudding user response:
The problem resolved:Struct pngcropinfo_s
{
PNG TPngImage *;
int x;
int y;
Int w;
Int h;
};
Void __fastcall TPngWrapper: : GetDestImage (TPngImage * Src, TPngImage * DestImg, pictureinfo_t * PIC)
{
PByteArray p1, p2,
PByteArray pa1, pa2;
Int sX, sY, dX, dY;
SY=PIC - & gt; y;
DY=0;
While (sY & lt; (PIC - & gt; Y + PIC & gt; H))
{
If ((sY & gt;=Src - & gt; Height))
break;
SX=PIC - & gt; x;
DX=0;
While (sX & lt; (PIC - & gt; X + PIC & gt; W))
{
If (sX & gt;=Src - & gt; Width) {
break;
}
PByteArray (DestImg - & gt; Scanline [dY]) - & gt; Data [3 * dX]=PByteArray (Src - & gt; Scanline (sY)) - & gt; Data (3 * sX];
PByteArray (DestImg - & gt; Scanline [dY]) - & gt; Data [3 * dX + 1]=PByteArray (Src - & gt; Scanline (sY)) - & gt; Data (3 * x + 1];
PByteArray (DestImg - & gt; Scanline [dY]) - & gt; Data [3 * dX + 2]=PByteArray (Src - & gt; Scanline (sY)) - & gt; Data (3 * x + 2];
PByteArray (DestImg - & gt; AlphaScanline [dY]) - & gt; The data/dX=PByteArray (Src - & gt; AlphaScanline (sY)) - & gt; Data [x];
SX++;
DX++;
}
SY++;
DY++;
}
}