Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#6

Re: Bitmap in Paintbox anzeigen

  Alt 15. Aug 2006, 23:18
Zitat von ferby:
Wenn ich mit TBitmap.LoadFromFile ein Bitmap lade,
dann wird das Bitmap ins linke obere Eck geladen.
In welche linke obere Ecke? Die vom Speicher? Mit der Methode LoadFromFile wird das Bitmap nur in den Speicher geladen, mehr nicht. Entscheident ist, wie du es auf den Canvas der PaintBox kopierst. Und wenn ich mir mal die Hilfe zu der Methode Delphi-Referenz durchsuchenDraw angucke, dann lese ich:
Zitat:
Renders the graphic specified by the Graphic parameter on the canvas at the location given by the coordinates (X, Y).

procedure Draw(X, Y: Integer; Graphic: TGraphic);

Description

Call Draw to draw a graphic on the canvas. Draw calls the Draw method of the graphic. The image is rendered into a rectangle determined by the size of the graphic, with the upper left corner at the point (X, Y).

Graphics can be bitmaps, icons, or metafiles. If the graphic is a TBitmap object, the bitmap is rendered using the value of CopyMode.
Den entscheidenden Teil habe ich mal hervorgehoben.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat