Changeset 472 for GraphicTest/Packages/bgrabitmap/bgragtkbitmap.pas
- Timestamp:
- Apr 9, 2015, 9:58:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/bgrabitmap/bgragtkbitmap.pas
r452 r472 65 65 gdk, gtkdef, gtkProc, gdkpixbuf, glib, 66 66 {$ENDIF} 67 FPImage ;67 FPImage, Dialogs; 68 68 69 69 {$IFDEF LCLgtk2} … … 141 141 end; 142 142 143 //SwapRedBlue;143 SwapRedBlue; 144 144 145 145 P := Rect.TopLeft; 146 DpToLP(ACanvas.Handle, P, 1);146 LPToDP(ACanvas.Handle, P, 1); 147 147 gdk_pixbuf_render_to_drawable(FPixBuf, 148 148 TGtkDeviceContext(ACanvas.Handle).Drawable, 149 149 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, 153 151 Width,Height, 154 152 GDK_RGB_DITHER_NORMAL,0,0); 155 153 156 //SwapRedBlue;154 SwapRedBlue; 157 155 end; 158 156 … … 251 249 252 250 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); 256 253 If ALineOrder = riloBottomToTop then VerticalFlip; 257 //SwapRedBlue;254 SwapRedBlue; 258 255 gdk_draw_rgb_32_image(TGtkDeviceContext(dest).Drawable, 259 TGtkDeviceContext(Dest).GC, pos. X,pos.Y,256 TGtkDeviceContext(Dest).GC, pos.x,pos.y, 260 257 AWidth,AHeight, GDK_RGB_DITHER_NORMAL, 261 258 AData, AWidth*sizeof(TBGRAPixel)); 262 //SwapRedBlue;259 SwapRedBlue; 263 260 If ALineOrder = riloBottomToTop then VerticalFlip; 264 261 end; … … 296 293 297 294 P := Point(x,y); 298 DpToLP(CanvasSource.Handle, P, 1);295 LPToDP(CanvasSource.Handle, P, 1); 299 296 gdk_pixbuf_get_from_drawable(FPixBuf, 300 297 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); 304 299 SwapRedBlue; 305 300 InvalidateBitmap;
Note:
See TracChangeset
for help on using the changeset viewer.