[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shape editors
philip@labtam.labtam.oz.au (Philip Stephens) writes:
> Does anyone know of a shareware/freeware/public domain shape editor for the
>GS? I need a program that can generate pixel data for shapes to be drawn on
>the SHR screen, at least for 8x8 and 16x16 shapes (if not arbitrary-sized
>shapes). If there isn't one, I'll have to take time off my game to write
>one...
Well, what you can do is use your favorite painting program and just
paint your shapes. Make sure you draw them at specific places on the
screen. For 8x8 shapes, say, ensure the top left hand corner of each
shape always starts at a multiple of 16 pixels (so you have some blank
space in between each shape). Then write a quick routine to load a
SHR picture, scan the shapes off the screen into your internal shape
data structures, and save them to disk as either data files or source
code for your assembler or compiler.
This method does involve a small amount of work (relative to writing a
shape editor) to get the load SHR-scan shapes-write data file routines
up and running, but you can probably write a generic sort of routine
that will scan any shape size, for an arbitrary number of shapes, with
arbitrary screen offsets. Then you can use it for 8x8 shapes, 16x16
shapes, or anything else you might want. It's ultimately a lot better
than writing a shape editor since there are enough decent painting
programs out there that writing another specialized one is a waste of
your time.
--
Jerry Penner jpenne@ee.ualberta.ca or jjp@myrias.ab.ca