<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../../aros.css' --->

Bitmap.mui

MUIA_Bitmap_Alpha

Function

Store the requested alpha value and select the alpha drawing path.

Inputs

Initialize, set and get, ULONG. Stored default 0xffffffff; alpha mode
starts disabled.

Notes

Supplying this tag, even with the default value, permanently enables the
local alpha flag. Its drawing branch is a TODO and performs no image
blit. No tag disables that flag. Get returns the stored value, not
whether alpha mode is enabled. Set requests no redraw; background/frame
drawing remains inherited.

MUIA_Bitmap_Bitmap

Function

Supply or retrieve the source bitmap.

Inputs

Initialize, set and get, struct BitMap pointer. Default NULL.

Notes

The pointer is borrowed and is never freed by Bitmap. Configured
Width/Height must describe accessible source pixels. A setter is ignored
while remapped storage exists, although its tag is still forwarded to
Area. No remap or redraw is requested. Get returns the source pointer,
not the remapped image; NULL means no source image.

MUIA_Bitmap_Height

Function

Set or retrieve the configured image height.

Inputs

Initialize, set and get, LONG. Default zero.

Notes

Use a positive dimension covered by the source bitmap. Draw crops to the
available content dimension and skips the blit if either resulting
dimension is nonpositive. Dimensions do not set minimum/default object
size, which remains one content pixel. Set does not resize existing
remapped storage, remap, redraw or relayout; changing dimensions while
set up can make them inconsistent with allocated resources. Remapping
uses narrower WORD counters.

MUIA_Bitmap_MappingTable

Function

Provide a source-index to destination-pen mapping.

Inputs

Initialize, set and get, UBYTE pointer. Default NULL.

Notes

The table is borrowed; provide a readable entry for every source pixel
index and keep it live during remapping. A 256-entry table covers all
byte indices. This table takes precedence over SourceColors and bypasses
pen acquisition. The caller manages destination pens and their lifetime.
Get returns the same borrowed pointer. Set does not rebuild existing
remapped data.

MUIA_Bitmap_Precision

Function

Select pen matching precision for SourceColors remapping.

Inputs

Initialize, set and get, LONG. Default PRECISION_GUI.

Notes

Passed as OBP_Precision to ObtainBestPenA, together with OBP_FailIfBad
FALSE. Not used by the explicit MappingTable path. No value validation
or live remapping occurs; Set only changes stored state for later use.

MUIA_Bitmap_RemappedBitmap

Function

Retrieve the internally allocated remapped bitmap.

Inputs

Get only, struct BitMap pointer. Default NULL.

Notes

Returns class-owned storage without transferring ownership. It can be
NULL because remapping was unnecessary, unsupported or failed; Setup
success does not distinguish these outcomes. Do not free it or retain it
after Cleanup/disposal. The getter does not fall back to the original
source bitmap.

MUIA_Bitmap_SourceColors

Function

Provide RGB components for indexed-source remapping.

Inputs

Initialize, set and get, ULONG pointer. Default NULL.

Notes

The borrowed table contains three ULONG components per source index, in
red/green/blue order, in the representation expected by ObtainBestPenA.
Provide all referenced entries; the class checks no length. MappingTable
takes precedence. Setup may obtain screen pens and cache them for
Cleanup; pen-zero caching and failure handling have the limitations
described in the class entry. Get returns the borrowed pointer. Set does
not remap or redraw.

MUIA_Bitmap_Transparent

Function

Choose the source palette index excluded by a generated mask.

Inputs

Initialize, set and get, LONG. Default -1 disables mask generation.

Notes

A value other than -1 requests a mask during indexed remapping. Matching
is against original byte indices before remapping. Without a remapping
pass, no mask is generated and this value alone does not make pixels
transparent. Set does not regenerate or remove an existing mask. Mask
allocation failure is not checked before initialization. This is
palette-index transparency, not the Alpha path.

MUIA_Bitmap_UseFriend

Function

Request the screen bitmap as friend when allocating remapped storage.

Inputs

Initialize only, BOOL. Default FALSE. No local setter or getter.

Notes

TRUE passes the screen bitmap to AllocBitMap and adds BMF_MINPLANES. The
requested depth is capped at eight; the friend affects actual allocation
behavior. This affects only remapping allocation and acquires no
ownership of the screen bitmap.

MUIA_Bitmap_Width

Function

Set or retrieve the configured image width.

Inputs

Initialize, set and get, LONG. Default zero.

Notes

Use a positive dimension covered by the source bitmap. Draw crops to the
available content dimension and skips the blit if either resulting
dimension is nonpositive. Dimensions do not set minimum/default object
size, which remains one content pixel. Set does not resize existing
remapped storage, remap, redraw or relayout; changing dimensions while
set up can make them inconsistent with allocated resources. Remapping
uses narrower WORD counters.

MUIC_Bitmap

Superclass

Area.mui

Description

Display a caller-owned bitmap at the upper-left content position,
cropping to the smaller of configured dimensions and available content
dimensions. No scaling is performed. Width and Height default to zero
and are not inferred from the source bitmap. Source bitmap, MappingTable
and SourceColors pointers are borrowed; keep them valid through their
use and later setup cycles.
Setup calls Area then optionally remaps an indexed source using
MappingTable or SourceColors. Remapping requires a source depth at most
eight, positive configured dimensions and at least one of those tables.
MappingTable takes precedence. Setup returns TRUE after Area success
even if remapping allocations fail. Draw chooses the remapped bitmap
when present, otherwise the original source.

Methods

AskMinMax adds one pixel to superclass minimum/default dimensions and
sets both maxima to MUI_MAXMAX; configured bitmap dimensions do not
determine these requirements. It returns TRUE. Draw calls Area and
returns TRUE even with no image or invalid dimensions. There is no local
drawing-flag test. If Alpha has ever been supplied, the local
image-drawing branch is unimplemented and draws nothing.
Set stores supported attributes but requests no remapping, redraw or
relayout. Bitmap replacement is ignored while a remapped bitmap exists.
Cleanup frees the transparency raster, waits for blits before freeing
the remapped bitmap, and releases cached pens through the live screen
ColorMap. Dispose additionally frees the remap table, but does not
substitute for Cleanup's raster and pen release. Follow the normal
setup/cleanup lifecycle.

Bugs

Transparency-raster allocation is followed by memset without checking
for NULL. Remapping uses WORD dimensions and loop counters and unchecked
allocation arithmetic; source coverage and table lengths are not
validated. Keep configured dimensions within both bitmap bounds and the
representable implementation range.
In the SourceColors pen path, an obtained pen plus a 0x100 marker is
assigned through a UBYTE temporary before storage in the WORD cache. The
marker is lost; pen zero is repeatedly obtained and not recognized for
release. Pen acquisition failure is also unchecked. Successful Setup
therefore does not establish successful remapping or balanced pen
acquisition for every palette.