[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

CopyRect Will not copy text

Posted on 2001-08-03
3
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 800 total points
ID: 6373261
Try a componet called Texcellent printer.

www.code4sale.com
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

656 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