Re: need to find/make graphics format




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.

.



Relevant Pages

  • Re: /boot/loader graphics support & extensibility
    ... and drawing filled rectangles (e.g. to clear the screen ... and different graphics hardware supports ... The Forth code calls the rectangle function. ... what will be the bitmap format of the temporary ...
    (freebsd-hackers)
  • Re: How do I turn off write combining programatically?
    ... I should not bother with GDI+ and try the DirectX drawing stuff. ... I just do something like this in paint event ... ... Any exception thrown while drawing with a Graphics will tend to ... >> screensaver, and my posted sample in sheer disgust and destroy all source ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Text in text boxes: vertical centre
    ... In PowerPoint all you need to do is select the text box, ... > drawing canvas is hidden from the user.) ... Irrespective of whether text boxes and other graphic objects are in a hidden ... > Hit the Help and read up on Graphics. ...
    (microsoft.public.mac.office.word)
  • Re: Is the Linux Graphics Stack Backwards?
    ... >GDI32.DLL only does drawing and it thunks down to a graphics driver ... >USER32.DLL handles all the input and also also the windowing. ... >windowing and input is completely abstracted from drawing. ... There are dozens of graphics systems for Linux besides X, ...
    (comp.os.linux.x)
  • Re: image maps - word 2007
    ... In Word it's a bit of trying to figure out where 'Escher 2', the new graphics ... Select a WMF file and insert it in the drawing ... Right click on the inserted graphic and choose Edit Picture, ... visible until you click on a segment. ...
    (microsoft.public.word.drawing.graphics)