Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

CopyRect Will not copy text

Posted on 2001-08-03
3
Medium Priority
?
174 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 35

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 800 total points
ID: 6373261
Try a componet called Texcellent printer.

www.code4sale.com
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

580 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