OpenAmiga (90/964)

From:Jesse McClusky
Date:6 Sep 2000 at 04:11:59
Subject:Re: AMIOPEN: Dev Questions

> From: "Andreas Kuessner" <ak@wk-artworks.de>
>
<snip>
> o.k., but what is if you opend a pixmap using an cnv loader? There
> you can not specify your own buffer. How to access the pixmap-memory in
this
> cases?

The only way to get the pointer (that I've found) is to use
the pointer at the direct offset: [pixmap+AVO_PIXMAP]
You have to be careful here though, because 1) the format
(bitdepth or otherwise) of the bitmap may change in the
future, 2) the "run" may cause the next pixel line to not start
immediately after the end of the previous line, and 3) your
code has the potential to be writing to the pixmap at the
same time that other code is, with unpredictable results.

Safest thing to do is use the built-in functions to blit, alter,
etc. the pixmap. There really are quite a number of useful
functions. If you absolutely *must* change random parts
of the pixmap dynamically, it would still be better to
create your own, blit over to it, modify that, then blit back
if it's not too large. As an absolute last resort, if no other
way accomplishes what you need, then you can use the
method above. But keep in mind your code may break
at any point in the future if you do. Same holds true for
all code that directly uses *internal* offsets.

Jesse

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html