rt

解决方案 »

  1.   

    http://msdn.microsoft.com/msdnmag/issues/05/12/catwork/default.aspx
      

  2.   

    var  G:TGPGraphics;
         image:TGPImage;
         imageArr:TGPImageAttributes;
    const 
      ColorMatrix: TColorMatrix =
       ((1.0, 0.0, 0.0, 0.0, 0.0),
        (0.0, 1.0, 0.0, 0.0, 0.0),
        (0.0, 0.0, 1.0, 0.0, 0.0),
        (0.0, 0.0, 0.0, 0.5, 0.0),
        (0.0, 0.0, 0.0, 0.0, 1.0));
    begin
        G:=TGpGraphics.Create(Self.Canvas.Handle);
        Image:=TGpimage.Create('c:\1.bmp') 
        imageArr:=TGPImageAttributes.Create;
        imageArr.SetColorMatrix(colorMatrix, ColorMatrixFlagsDefault,ColorAdjustTypeBitmap);
        g.DrawImage(
          image,
          MakeRect(30, Height, Width, Height), // Destination rectangle
          0,                                   // Source rectangle X
          0,                                   // Source rectangle Y
          Width,                               // Source rectangle width
          Height,                              // Source rectangle height
          UnitPixel,
          imageArr
        );    
        G.free ;
        image.free ;
        imageArr.free;   
    end;
      

  3.   

    MakeRect(30, Height, Width, Height),//////MakeRect(0,0,Width,Height);