Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

CT v5.10 doesn't show a correct color at TImage 9 years 3 months ago #6544

  • chulwoong
  • chulwoong's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 2
Hi,

I am building an application for RPI. Please, have a look codes below.

procedure TForm1.Button4Click(Sender: TObject);
var R : TRect;
begin
Image1.Picture.Bitmap.PixelFormat := pf32bit;
Image1.Picture.Bitmap.Width := 640;
Image1.Picture.Bitmap.Height:= 480;
R.Left := 0;
R.Right := 640;
R.Top := 0;
R.Bottom:= 480;
Image1.Picture.Bitmap.Canvas.Brush.Style := bsSolid;
Image1.Picture.Bitmap.Canvas.Brush.Color := clBlue;
Image1.Picture.Bitmap.Canvas.Pen.Style := psClear;
Image1.Picture.Bitmap.Canvas.FillRect(R);
end;

When I excute the code, it doesn't show any color on Image1(TImage). When I try this on Windows7, it works.

How do I go around this problem?

Thanks in advance.

Please Log in or Create an account to join the conversation.

CT v5.10 doesn't show a correct color at TImage 9 years 3 months ago #6545

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Please Sir
try:
PixelFormat := pf24bit;
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1