Re: [Alephmodular-devel] Drawing Contexts - CDContext
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2003-08-16 15:56:04
|
On Monday, July 28, 2003, at 10:14 PM, Alexander Strange wrote: > > On Monday, July 28, 2003, at 06:24 PM, Br'fin wrote: > >> Yes, I know it's old and crusty in here. But I never know quite what >> to do aside from occasionally making some headway on the Display >> Abstraction. >> >> The general business I see CDContext dealing with will mainly be >> drawing lines, text, and filling areas. As such it will provide the >> support/features needed and provided by screen_drawing.cpp. As well >> as other areas where direct drawing commands are done upon a buffer. >> (For instance, asking a buffer to be erased/filled to a color) > > It would be useful if it also supported basic transforms like scaling > (so we can read terminals comfortably at high screen resolutions, > although we may not want to scale the pictures); Quartz and OpenGL > will handle this for you in OSX. > >> But that is probably fairly rare to begin with. And in the future may >> allow us to shift to a Quartz based drawing scheme. (Heh, >> anti-aliased text and map lines?) > > I would definetely recommend starting out with Quartz/CoreGraphics > instead of a QuickDraw API. > Well, I need more of the drawing context stuff in place before I can supersede it with Quartz stuff I think. Given the current layout of the code, I don't think there's any problems with using Quickdraw APIs. They would just break things in the drawing abstraction that aren't currently used by the code. I do like the concept of a CScaledBuffer though. Something where you set it up like: scaled_buffer= buffer.get_scaled_buffer(Rectangle(640, 480, 0, 0)); And intervening code around things like the associated drawing context manipulates graphic commands; transforms things like the font used and the actual pixel locations. -Jeremy Parsons |