Ignore:
Timestamp:
Apr 9, 2015, 9:58:36 PM (10 years ago)
Author:
chronos
Message:
  • Fixed: Use csOpaque control style also to Image, PaintBox and OpenGLControl.
  • Modified: Change size of test frame with SpinEdits as delayed using timer.
  • Updated: BRGABitmap package to version 8.1.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/bgrabitmap/bgragtkbitmap.pas

    r452 r472  
    6565  gdk, gtkdef, gtkProc, gdkpixbuf, glib,
    6666  {$ENDIF}
    67   FPImage;
     67  FPImage, Dialogs;
    6868
    6969{$IFDEF LCLgtk2}
     
    141141  end;
    142142
    143   //SwapRedBlue;
     143  SwapRedBlue;
    144144 
    145145  P := Rect.TopLeft;
    146   DpToLP(ACanvas.Handle, P, 1);
     146  LPToDP(ACanvas.Handle, P, 1);
    147147  gdk_pixbuf_render_to_drawable(FPixBuf,
    148148    TGtkDeviceContext(ACanvas.Handle).Drawable,
    149149    TGtkDeviceContext(ACanvas.Handle).GC,
    150     0,0,
    151     TGtkDeviceContext(ACanvas.Handle).Offset.X + P.X,
    152     TGtkDeviceContext(ACanvas.Handle).Offset.Y + P.Y,
     150    0,0, P.X,P.Y,
    153151    Width,Height,
    154152    GDK_RGB_DITHER_NORMAL,0,0);   
    155153
    156   //SwapRedBlue;
     154  SwapRedBlue;
    157155end;
    158156
     
    251249
    252250  dest := ACanvas.Handle;
    253   pos := TGtkDeviceContext(dest).Offset;
    254   pos.X += rect.Left;
    255   pos.Y += rect.Top;
     251  pos := rect.TopLeft;
     252  LPtoDP(dest, pos, 1);
    256253  If ALineOrder = riloBottomToTop then VerticalFlip;
    257   //SwapRedBlue;
     254  SwapRedBlue;
    258255  gdk_draw_rgb_32_image(TGtkDeviceContext(dest).Drawable,
    259     TGtkDeviceContext(Dest).GC, pos.X,pos.Y,
     256    TGtkDeviceContext(Dest).GC, pos.x,pos.y,
    260257    AWidth,AHeight, GDK_RGB_DITHER_NORMAL,
    261258    AData, AWidth*sizeof(TBGRAPixel));
    262   //SwapRedBlue;
     259  SwapRedBlue;
    263260  If ALineOrder = riloBottomToTop then VerticalFlip;
    264261end;
     
    296293
    297294  P := Point(x,y);
    298   DpToLP(CanvasSource.Handle, P, 1);
     295  LPToDP(CanvasSource.Handle, P, 1);
    299296  gdk_pixbuf_get_from_drawable(FPixBuf,
    300297    TGtkDeviceContext(CanvasSource.Handle).Drawable,
    301     nil,
    302     TGtkDeviceContext(CanvasSource.Handle).Offset.X+P.X,
    303     TGtkDeviceContext(CanvasSource.Handle).Offset.Y+P.Y,0,0,Width,Height);
     298    nil, P.X,P.Y,0,0,Width,Height);
    304299  SwapRedBlue;
    305300  InvalidateBitmap;
Note: See TracChangeset for help on using the changeset viewer.