09 June 2015, 23:01 | #1 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 761
|
Transparent background
Hello mates.
I load all my gfx using Datatypes and can blit them using BltBitmapRasport() without problems. The question is that I need some gfx have the background transparent. I guess I need the mask version of BltBitmapRasport() but I´m unable to show it correctly. Tried with different minterms but never get any transparency. I need ideas or know if this is the right function. Hope I have explained it more or less and thanks! |
09 June 2015, 23:41 | #2 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
you need to create a mask (by ORing all the bitplanes together) and then use BltMaskBitmapRastPort().
|
10 June 2015, 00:44 | #3 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 761
|
I have created 1bit mask and use that function. Perhaps I have created a wrong mask? Didn't know about ORing all planes. That is setting bit that want to be displayed to 1 and 0 for transprent. Will try tomorrow again.
And what about the minterm? Thanks. Last edited by tolkien; 10 June 2015 at 06:35. |
10 June 2015, 10:50 | #4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,004
|
The correct minterm for blit though mask is ABC|ABNC|ANBC.
You can ask for PDTA_MaskPlane to get a mask from datatypes if the datatype class supports it (and if the image contains a mask plane or a transparent color). In any case you have to be careful if your display is on the native chipset. If both source and target bitmaps are interleaved, the mask has to be extended vertically to match height * depth, i.e. each row in the mask has to be repeated depth times. |
10 June 2015, 13:52 | #5 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 761
|
Good tips thomas. I'll try to get the mask through pdta_maskplane.
Have I to make a bitmap friend? Thanks mate. |
10 June 2015, 14:17 | #6 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,004
|
Well, it depends.
I am just now developing a project with blit through mask and my experience is that it is very difficult to support all kinds of environments. Currently my knowledge is like this: - if you are running native with planar bitmaps, you should not use a friend. Then your source bitmap most likely is not interleaved and thus you can use a simple single-plane mask - if you are running native and use a friend, then you have to consider interleaved bitmaps and change your mask accordingly. (interleaved bitmaps are better in speed and have less artifacts, so if you are doing an animation or a moving object, you should go the interleaved route.) - if you are running RTG with depth <= 8 it does not matter, a single-plane mask is always fine. - if you are running RTG with depth > 8 you need a friend, because at least CyberGraphics does not blit through a mask if the pixel formats do not match. Picasso96 is more tolerant in many areas, but not here I think. Results are just different: CGX does not blit at all, P96 blits all black but with correct shape. |
13 June 2015, 00:09 | #7 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 761
|
Thanks Thomas for all info. I´m rewriting a few things and will try again.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need quick transparent blitting | meynaf | Coders. General | 15 | 13 November 2020 16:08 |
Amiga OS 3.9: Transparent background of Icons font? | Kenan | support.Other | 2 | 29 June 2013 10:35 |
Transparent winuae | Fermix | support.WinUAE | 5 | 12 December 2007 16:28 |
Amiga transparent icons how to | Tolismlf | support.Apps | 9 | 27 November 2004 15:00 |
Transparent icon dragging | oldpx | support.Apps | 2 | 05 September 2002 06:17 |
|
|