trichview.com

trichview.support




printer problem


Return to index


Author

Message

Kim Do Young

Posted: 04/12/2002 11:55:18


Hi,

I've written a code which draw a logo on RVPrint1's canvas with graphic

functions.

it was shown correctly  in my printer(it is 300dpi)

but in 600dpi printer, it was shown with small size.


I don't know why?


following is my codes

----------------------------------------------------------

procedure TForm1.RVPrint1PagePrepaint(Sender: TRVPrint; PageNo: Integer;

  Canvas: TCanvas; Preview: Boolean; PageRect, PrintAreaRect: TRect);

begin

//  DrawMargins1(Canvas, PrintAreaRect, PageNo);

  DrawMargins2(Canvas, PrintAreaRect, PageNo);

end;


rocedure TForm1.DrawMargins2(Canvas: TCanvas;

  const R: TRect; PageNo: Integer);

var

  PageLeft : integer;

  PageNoStr : String;

begin

....

     DrawGPMark2(Canvas,R.Right-430,R.Bottom + 60, 50, 50);

....

end;


procedure TForm1.DrawGPMark2(Canvas: TCanvas; x,y,width,height : integer);

var

  Depth : integer;

  x2,y2 : integer;

  small_width , small_height : integer;

  bios : integer;

begin

    Canvas.Pen.Width := 4;

    Canvas.Pen.Style := (psSolid);


    Depth := round(width * 15/50);

    bios := round(height * 8/50);


    x2 := x+width; y2 := y+height;

    small_width  := (x2-x) div 2;

    small_height := (y2-y) div 2;


    SetMapMode(Canvas.Handle, MM_ANISOTROPIC);

    Canvas.Ellipse(x,y,x2,y2);


    Canvas.Ellipse(x+Depth,y+Depth,x2-Depth,y2-Depth);

    Canvas.Arc(

           x,y+depth-bios,

           x2-depth,y2-depth+bios,


           x,y+depth+(small_height div 2) ,

           x2-depth,y+depth+(small_height div 2)

           );

    Canvas.Arc(

           x+depth,y+depth-bios,           x2,y2-depth+bios,

           x2,y+depth+(small_height div 2),

           x+depth,y+depth+(small_height div 2)

           );

end;






Powered by ABC Amber Outlook Express Converter