Solved

CopyRect Will not copy text

Posted on 2001-08-03
3
159 Views
Last Modified: 2010-04-06
I'm trying to copy text and images from one canvas to my printer.canvas.

My goal is to inverse and turn up sidedown the text and images on the canvas to make a quad fold program.

I have a couple problems

1. If I use this code it only flip images

AtmpCanvas    := Printer.canvas;
  if (i - 1) mod 4 > 1 then
TmpInt := (TmpHeight div 2)
else TmpInt := 0;
DrawPage(AtmpCanvas,
        0 + (TmpWidth div 2 + SpaceBuffer) * ((i -        1) mod 2),
        0 + TmpInt,
        TmpWidth div 2,
        TmpHeight div 2,
        PrintArray[i],
        True,
        (TmpInt = 0) and      frmSelection.SelectionType in [selBulletin,   selSpecial, SelDirectory]));
 // this is suppost to flip it for Quarter
with Printer do
begin
  Canvas.CopyRect(Rect(0,TmpHeight div 2, TmpWidth div 2, 0), AtmpCanvas, Rect(0,0,TmpWidth div 2,TmpHeight div 2)); // vertical flip
Canvas.CopyRect(Rect(TmpWidth div 2, 0, 0, TmpHeight div 2), AtmpCanvas, Rect(0,0,TmpWidth div 2, TmpHeight div 2)); // horizontal flip
                                   end;
Other varities of this give me errors
0
Comment
Question by:mchagberg
3 Comments
 
LVL 34

Expert Comment

by:Slick812
ID: 6350919
you are filpping the image twice, but both are the ORIGINAL unflipped image on the AtmpCanvas so the printer image will be the LAST flip you did. you may need to get a temp Bitmap canvas and flip it again from there . . .

Canvas.CopyRect(Rect(0,TmpHeight div 2, TmpWidth div 2, 0), TempBitmap.Canvas, Rect(0,0,TmpWidth div 2,TmpHeight
div 2)); // vertical flip

Canvas.CopyRect(Rect(TmpWidth div 2, 0, 0, TmpHeight div 2), TempBitmap.Canvas, Rect(0,0,TmpWidth div 2, TmpHeight
div 2)); // horizontal flip
0
 

Author Comment

by:mchagberg
ID: 6352186
Slick812

AtmpCanvas is pointing to Printer.canvas so it is fliping the images right, but the text on the canvas does not flip with the images.  

Thanks
 
Mike (MCHagberg)
0
 

Accepted Solution

by:
wrinkley earned 200 total points
ID: 6373261
Try a componet called Texcellent printer.

www.code4sale.com
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question