Re: need to find/make graphics format
- From: agila61@xxxxxxxxxxxx
- Date: 12 Nov 2005 20:38:48 -0800
David Murray wrote:
> I don't need anything nearly as sophisticated. In fact, the line drawing
> tools built into Basic 3.5 and Basic 7 would be adequate, unfortunatly
> BASIC is too slow for my needs. I'd need to come up with a format for
> efficiently storing the data. Maybe 3 or 4 bytes per object. I mostly
> need lines and dots. They don't have to be "vector" in the sense that I
> don't need to move them around either.
> I guess I'll start making the format on my 128 or Plus/4 in BASIC. I'll
> create a file-format and some test patterns. Once I have some usable data,
> I'll try to write an ML version to read the data and place it on the
> screen.
At heart, "Vector"just means describing lines and points, instead of
giving a bit map, so you are talking vector ... just a very simple kind
of vector graphics.
One of the more straightforward way to do this is with turtle vector
graphics. Define a set of "drawing actions" from 1 on up, that is the
first byte of each entry. Then define the information you need to know
for each action, which is the remainder of each entry. Something like:
1: Pen_To. COL_location. ROW_location.
2: Make_Point. Size. Colour. (this could be one byte if its 4-bit
colour).
3: Line_Style. Width. Colour. (ditto)
4: Pen_Off.
5: Finished drawing
If that turtle is smart enough for what you need, and you do not have
too many dot and line sizes to worry about, you could put the action in
the top two bits of the first byte of an entry. Indeed, if you were
drawing lines in character graphics, where the number of "points" is 40
by 25, then you could have each event as a single byte by packing the
information into individual bits. If you are drawing in a graphics
window, you still don't need that much for each event.
Pen_To: %01aaaaaa BB CC
.... aaaaaa are the upper bits of COL_location
AA = low bits of COL_loc
BB = ROW_loc
Make_Point: %10sscccc
ss = size (1 to 4)
cccc = colour (16-colour graphics)
Line_Style: %11sscccc
ss = width (1 to 4)
cccc = colour (16 colour graphics)
Pen_Off: %00ffffff
ffffff = 111111 if graphics continues, 000000 if drawing is done.
.
- References:
- need to find/make graphics format
- From: David Murray
- Re: need to find/make graphics format
- From: MagerValp
- Re: need to find/make graphics format
- From: David Murray
- need to find/make graphics format
- Prev by Date: Re: C64 DTV PAL questions follow-up
- Next by Date: Re: C64 DTV PAL questions follow-up
- Previous by thread: Re: need to find/make graphics format
- Next by thread: Re: need to find/make graphics format
- Index(es):
Relevant Pages
|