creating a scalable image
creating a scalable image
- Subject: creating a scalable image
- From: Brad Werth <email@hidden>
- Date: Tue, 05 Jun 2001 11:36:09 -0700
- Organization: ORCAS, Inc.
Hello all:
I have been been working on a subclass of NSCell that does all of its
own drawing. My NSCell subclass is forced to a specific proportion at
all times, but can be any size. What I want to do is to draw the
contents of the cell such that EVERYTHING inside scales evenly as the
cell is resized.
What I have been doing so far is to calculate a lot of sub-rects based
upon percentages (for example, a rect that begins at the top left corner
and extends 25% across the total width and 50% down the total height).
This is working okay for lines and fills, but totally falling apart for
text. And, in general, its becoming clear to me that this is the Hard
Way. It seems like the easy way would be do do all my drawing to some
vector representation (PDF? EPS?) once at a known size, and then scale
the entire thing to the appropriate size as needed. Can somebody
enlighten me as to how to pursue this? Would I still be using the
NSBezierPath methods? What would I be drawing to? Any help would be
much appreciated.
Thanks,
Brad Werth
email@hidden