realbasic-nug
[Top] [All Lists]

How do draw canvas.graphics.DrawPicture p without anti-aliasing?

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: How do draw canvas.graphics.DrawPicture p without anti-aliasing?
From: "Peter K. Stys" <pkstys at gmail dot com>
Date: Sat, 29 Apr 2006 21:50:47 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=AuRlmAknY8pNFEDhRr4gNiuHw7hRQHSs/LOjeD+BFfoiBcpDN/VJNLhlWx3GVZ2THr64K+z3rzZOSS+ZBefzj2BwmL+Id7AsBqyqrs90MfsUGc65hFWT6HfLyCpyeEbl6pQ3w8Cj1x53zcYZCHqIUsTfnygxmkPqISrmmFfaXdY=
I have a call in my app that draws a large pixmap into a canvas:

imageCanvas.graphics.DrawPicture p, 0, 0, destWidth, destHeight,
sourceX, sourceY, sourceWidth, sourceHeight

When destWidth/Height are much greater than sourceWidth/Height (ie at
high "zoom") the pixels are anti-aliased and therefore fuzzy.  Problem
is my program is a scientific imaging app and I need accuracy not
visually pretty pictures.

When useOldRenderer=true, QuickDraw would draw the pixels without blur
(that's the only way it knew how).  But now we have extras we don't
always want.  I can't do this with useOldRenderer set to true because
that would defeat translucency in other vector objects I'm also
drawing atop the pixmap.

Is there a way to control or defeat the anti-aliasing in
graphics.DrawPicture with Quartz (I bet this imposes a hefty
performance hit as well)?

I found an interim solution by useOldRenderer=true for the pixmap,
then =false for the vectors, but Quickdraw will one day disappear for
good, so it would be good to know if this can be controlled in Quartz.

Thx,
Peter

--
-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel:    (613)761-5444
fax:    (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>