Author Topic: What's the drawing library situation in OS9?  (Read 1258 times)

Offline hihi09

  • Member
  • *
  • Posts: 2
  • retro itinerant
What's the drawing library situation in OS9?
« on: August 16, 2018, 05:44:12 PM »
Hello good people of OS9,

I have a little personal project I want to attempt porting to OS9 (and maybe OS8). However I'm unclear on what advanced drawing features I can rely upon, if any. First I was hopeful maybe Quartz was backported via CarbonLib, but I eventually found some Apple document explicitly stating "no".

Then I was really excited to stumble upon QuickDraw GX - wow, perfect! - but then saddened as I read it was killed off around OS8/8.6. There's apparently a GX extension that can be used after that, but I'm unclear on whether that's viable for OS9. Something about compatibility issues with various apps?

So am I understanding all this right? Are there any 3rd party libraries that can pick up the slack? Specifically I'm looking for things like curves, masking, matrix transforms, font outline rendering, etc. I'm planning on using the PowerPlant framework if that matters.

Offline Naiw

  • Consistant Contributor
  • ***
  • Posts: 113
  • new to the forums
Re: What's the drawing library situation in OS9?
« Reply #1 on: August 17, 2018, 08:03:51 PM »
Hello good people of OS9,

I have a little personal project I want to attempt porting to OS9 (and maybe OS8). However I'm unclear on what advanced drawing features I can rely upon, if any. First I was hopeful maybe Quartz was backported via CarbonLib, but I eventually found some Apple document explicitly stating "no".

Then I was really excited to stumble upon QuickDraw GX - wow, perfect! - but then saddened as I read it was killed off around OS8/8.6. There's apparently a GX extension that can be used after that, but I'm unclear on whether that's viable for OS9. Something about compatibility issues with various apps?

So am I understanding all this right? Are there any 3rd party libraries that can pick up the slack? Specifically I'm looking for things like curves, masking, matrix transforms, font outline rendering, etc. I'm planning on using the PowerPlant framework if that matters.

Apple never backported anything from Rhapsody/Mac OS X to Mac OS 9, Carbon is the "exception" but Carbon on Mac OS 8/9 is just the classic Toolbox wrapped in the Carbon API, it didn't give any new features to the classic Mac OS (except possibly Carbon Events, but I don't recall if they actually were available on classic Mac OS), it was just there to allow developers to use the subset of the toolbox (with the new opaque structures) a chance to have their apps running on OS X natively.

The fact an application works under OS 8/9 carbon does not mean it works on OS X however.

Either way it sounds like you mainly want some vector graphics library... unfortunately I don't think there ever was any (Outside of Quickdraw GX), I believe the best you can get with some amount of availability on most systems would be to leverage on AGL (Apple/Conix OpenGL).

Offline hihi09

  • Member
  • *
  • Posts: 2
  • retro itinerant
Re: What's the drawing library situation in OS9?
« Reply #2 on: August 18, 2018, 12:36:04 AM »
I see, thank you very much for the info!

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #3 on: September 04, 2018, 07:02:59 AM »
QuickDraw GX wasn't really killed off. It got a second life in the form of Unicode support.

Offline IIO

  • Platinum Member
  • *****
  • Posts: 2057
  • new to the forums
Re: What's the drawing library situation in OS9?
« Reply #4 on: September 04, 2018, 01:35:52 PM »
if you also want font rendering, GL is all i could think of.

"It is true that the "pre-emptive multitasking" advantage present in OS X can be illustrated by downloading CD-ROM ISOs and rendering chaos theory formulas while simultaneously instant messaging and posting on FaceBook what you ate... but in reality, what did you create?"
- DieHard, random forum troll at macos9lives.com

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #5 on: September 06, 2018, 06:39:58 AM »
AppleWorks is my only program which uses QuickDraw GX. AppleWorks is still one of the best programs for OS 9. QuickDraw GX must be really something. Unfortunately it's extensive and difficult, which in my opinion explains why nobody tried it. For example, if you want to render MusicXML then QuickDraw GX would be perfect. There's a QuickDraw GX SDK with examples. If you try a few of those examples, then you may start to like it.

Now you mentioned that you wanted a library and that you want to use PowerPlant. That's C++. I suppose that you want C++ wrapper classes for QuickDraw GX? I wouldn't make it depend on PowerPlant. Why would you do that? Many years ago I wrote such wrapper classes for QuickDraw 3D and this worked. You only have to pay attention that you don't go the PowerPlant way and use too much C++ like throwing exceptions in constructors and destructors, because then it becomes a mess.

What exactly would you like to draw?

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #6 on: September 08, 2018, 02:48:12 AM »
The SDK contains almost 100 source code examples.
All you need to use QuickDraw GX on OS 9.2.2 is the GXGraphics extension.
I tried version 1.1.6 and it worked.
I'm not sure whether this is the final version.
I tried GXWrite 1.0 on OS 9.2.2, a text editor that uses QuickDraw GX.
What's the final version of QuickDraw GX?

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #7 on: September 13, 2018, 06:55:50 AM »
1.1.6

There's a fan club: http://www.gxfanclub.com

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #8 on: September 18, 2018, 05:10:48 AM »
The main problem with a drawing library seems to be that if you want to print your work then you have to translate everything to PostScript, except if you use QuickDraw.

An alternative is to draw everything in a large bitmap and then translate the bitmap to PostScript.

Offline classicmacreborn7

  • Active Member
  • **
  • Posts: 17
  • New Member
Re: What's the drawing library situation in OS9?
« Reply #9 on: January 06, 2019, 02:38:59 PM »
Kind of off-topic, but speaking of Carbon/Quickdraw...  I know one of the managers (Window Manager I think) in Toolbox as an API that provides coordinates to open windows.  It would actually be quite feasible to build a replacement finder using the MPW interfaces that passes window coordinates back to an emulator which then uses SDL to crop the emulation window to the OS9 window.

Or better yet, get OS9 to render each window into its own graphics object and then pass the graphics object to modern OSX which displays it in SDL.  You could even have the graphics object's canvas shrink when the window is collapsed.

You'd tell the info.plist of the emulator to run as an agent, and have a modern version of the Classic Mac OS environment essentially.  It would be a lot of work, but that sure would be cool.

Maybe that's what I'll work on when I finish WrapperFinder  :D

Offline OS923

  • Gold Member
  • *****
  • Posts: 360
Re: What's the drawing library situation in OS9?
« Reply #10 on: January 09, 2019, 07:33:41 AM »
We look forward to this great accomplishment.