Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#15

AW: pf8Bit seltsames aussehen der Palette

  Alt 11. Apr 2016, 09:25
Okay war bei Scanline nicht das Problem dass du in erster Linie vertikal zeichnen musst?
Wie wärs wenn du das Bitmap um 90° gedreht zeichnest. Also statt

|||||||||||||||||||||||||||||||||||||||||

so:

_
_
_
_
_
_
_

Und dann kannst du das Bitmap per PlgBlt um 90° gedreht dahin zeichnen wo es auftauchen soll.
ScanLine würde ich dann wieder mit pf32Bit versuchen.

Delphi-Quellcode:
// Malt das Bitmap um 90° nach rechts gedreht auf ein Canvas
procedure DrawRotated90(ABitmap: TBitmap; ACanvas: TCanvas; AX, AY: Integer);
var RotatePoints: Array[0..2] of TPoint;
begin
  RotatePoints[0] := Point(ABitmap.Height+AX, AY);
  RotatePoints[1] := Point(ABitmap.Height+AX, ABitmap.Width+AY);
  RotatePoints[2] := Point(AY, AY);
  PlgBlt(ACanvas.Handle, RotatePoints[0], ABitmap.Canvas.Handle, 0, 0, ABitmap.Width, ABitmap.Height, 0, 0, 0);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  DrawRotated90(Image1.Picture.Bitmap, Canvas, 10, 10);
end;
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat