1

I am using the Graphics32 TColorPickerGTK component, unfortunately, it doesn't support VCL Styles. My first thought was to clear the FBuffer in the PaintColorPicker() method as such,

FBuffer.Clear( Color32( StyleServices.GetStyleColor( scWindow ) ) );

works great for non textured styles, but, for styles like Glossy or Jet, not much chop.

An epiphany and I was on my way, copy the bitmap under the control with the Create() method and just paint it back on the PaintColorPicker () method.

ABitmap := TBitmap32.Create();
ABitmap.SetSize( Width, Height );
ARect1 := Rect( 0, 0, Width, Height );

ABitmap.Canvas.CopyRect( ARect1, {No canvas object}, ARect1 );

How do I get access to the underlying canvas of the form, so CopyRect works?

Rudy Velthuis
  • 28,387
  • 5
  • 46
  • 94
GrooverMD
  • 131
  • 3
  • 12

0 Answers0