Einzelnen Beitrag anzeigen

peanut
(Gast)

n/a Beiträge
 
#1

Mit FloodFill gefüllte Metagrafik im Druck weiß

  Alt 31. Jul 2008, 08:44
Hallo,

ich erzeuge mit folgendem Code

Delphi-Quellcode:
[...]

var meta_image: TMetaFile;
    mfc: TMetafileCanvas;
    poly_array: array of TPoint;
begin
  meta_image := TMetaFile.Create;
  meta_image.Width := 80;
  meta_image.Height := 80;

  SetLength(poly_array, 4);
  poly_array[0].X := 30;
  poly_array[0].Y := 30;
  poly_array[1].X := 60;
  poly_array[1].Y := 55;
  poly_array[2].X := 10;
  poly_array[2].Y := 75;
  poly_array[3].X := poly_array[0].X;
  poly_array[3].Y := poly_array[0].Y;


  mfc := TMetaFileCanvas.Create(meta_image, 0);
  mfc.Pen.Width := 1;
  mfc.Pen.Color := clBlack;
  mfc.Brush.Color := clWhite;
  mfc.FillRect(Rect(0, 0, width-1, height-1));

  mfc.Polygon(poly_array);
  mfc.Brush.Color := clYellow;
  mfc.FloodFill(30, 60, clWhite, fsSurface);
  mfc.Brush.Color := clPurple;
  mfc.FillRect(Rect(20, 20, 35, 40));

  mfc.Brush.Color := clWhite;
  mfc.Rectangle(Rect(5, 5, 70, 20));
  mfc.Brush.Color := clRed;
  //mfc.FloodFill(20, 10, clWhite, fsSurface);
  FloodFill(mfc.Handle, 20, 10, clBlack);
  mfc.Free;

  meta_image.SaveToFile('c:\test.wmf');
  meta_image.Free;

[...]
eine Metagrafik mit verschiedenen Elementen, die ausgefüllt sind. Wenn ich mir die erzeugte Grafik in MS-Paint anschaue, werden die Polygone auch gefüllt dargestellt. Sobald ich diese Grafik z.B. in TextMaker, Word oder Papyrus importiere, sind die Flächen entweder bereits in der Dokumentenansicht weiß oder beim späteren Ausdruck (egal ob PDF oder direkt an den Drucker)?!

Hat jemand eine Idee was hier falsch läuft? Sind die von mir erzeugten Metagrafiken nicht "standard"konform?

Viele Grüße,

peanut.
  Mit Zitat antworten Zitat