Thread View: comp.sys.amiga.tech
3 messages
3 total messages
Started by David R. Tyler
Fri, 04 Jan 1991 23:27
Help with DrawImage +
Author: David R. Tyler
Date: Fri, 04 Jan 1991 23:27
Date: Fri, 04 Jan 1991 23:27
68 lines
2993 bytes
2993 bytes
Hello all!
I have been playing around with creating/drawing images...
and had very few problems... (GRR!)
but, when i changed to a CUSTOMSCREEN (it was on the WBSCREEN)
with 3 planes (8 colours), i get garbage when i attempt to
drawimage into the last color (color 7)...
wondering if perhaps there is a hidden bug in the os (or something)
having to do with plotting an image into the last plane of a
window (and having more data to go...?), i added another plane,
now i have 4. This fixed the garbage problem but...
when i draw 7 of these images in a row accross my screen,
(white, green, yellow, blue, grey, brown, BLUE)
the last blue SHOULD BE RED. THE Color is set to red (15)...
does anyone have ANY IDEA WHY this happens? i really want to use
that color in my program!!!!
here is a snippet of the code:
---------------------------------------------------------------------------
here.PlanePick=7;
DrawImage(Rport,&hex,200,190);
---------------------------------------------------------------------------
hex is the associated image structure:
struct Image hex =
{
0,0 - leftedge, topedge
32,9,2 - width, height, depth
HEXA,7,0, - ImageData, PlanePick, PlaneOnOff
NULL - NextImage
};
HEXA is of type USHORT, and is in CHIP..
--------------------------------------------------------------------------
my image data is enough for 2 planes, but when i change depth to 1, and
remove the data for the second plane (it was only a dup of the first
plane) i get garbage spread through the 7 images, and the colors are
an alternating series of the first 2 colors (white & green).
i am completely baffled.
does anyone know why it would be blue (as opposed to another color)
which is color 4 in my pallete?
i look forward to SOMEONE having a clue as to why this is happening..
if anyone wants to see the code, the file(s) are short, and i could forward
copies in mail... (*wistful sigh*) thanks....
__________________________________________________________________________
C= //_\ Only | The Amiga Aquarium 300/1200/2400 ->|b|
__ ///_\\ _ _ _ _ |USA: (716) 837-1699 |a|
\\\///---\\ |\/| | |_| |_\ |School: Tyler33@Snybufva.Bitnet |u|
\\// \\_________| |UseNet: dave@aquarium.buffalo.ny.us (Home) |d|
__\/_______________________|____________________________________________|_|
Re: Help with DrawImage +
Author: Jean-Michel Forgeas
Date: Sun, 06 Jan 1991 13:57
Date: Sun, 06 Jan 1991 13:57
34 lines
1737 bytes
1737 bytes
In article <18789829.ARN020d@aquarium.buffalo.ny.us>, David R. Tyler writes:
> Hello all!
> [...]
> but, when i changed to a CUSTOMSCREEN (it was on the WBSCREEN)
> with 3 planes (8 colours), i get garbage when i attempt to
> drawimage into the last color (color 7)...
Are you sure your PlanePick value does represent the exact number
of planes stored in your image data ?
> struct Image hex =
> {
> 0,0 - leftedge, topedge
> 32,9,2 - width, height, depth
> HEXA,7,0, - ImageData, PlanePick, PlaneOnOff
> NULL - NextImage
> };
Your PlanePick value of 7 (00000111) means that HEXA has 3 planes...
> my image data is enough for 2 planes, but when i change depth to 1, and
...but HEXA has only 2 planes. So the third plane to be drawn is the
memory following the second plane. Who knows what it is ?
This can be one of your problems, but I think you have others and
I need a piece of your code to understand more.
--
\___/
Jean-Michel Forgeas \-/
cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery
-^-
And, where is the universe ?
Re: Help with DrawImage +
Author: Peter Kittel GERMANY
Date: Mon, 07 Jan 1991 10:02
Date: Mon, 07 Jan 1991 10:02
16 lines
1361 bytes
1361 bytes
In article <18789829.ARN020d@aquarium.buffalo.ny.us> dave@aquarium.buffalo.ny.us writes:
> but, when i changed to a CUSTOMSCREEN (it was on the WBSCREEN)
> with 3 planes (8 colours), i get garbage when i attempt to
> drawimage into the last color (color 7)...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The value 7 for planepick doesn't mean that you draw "into color 7",
but that you draw into bitplanes 1 to 3. The value 7 is the three
lowest bits set, and each bit stands for one bitplane.
If you only have data for two bitplanes (as your depth parameter
says), then indeed garbage will occur for the third plane.
To check this out, try to set planepick to 3, which will limit
the planes to 2.
--
Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions...
Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads