App
Public Member Functions | Public Attributes | List of all members
mhr.appcore.bitmap.BitmapInfo Class Reference

Struktura obsahující informace o bitmapě. More...

Public Member Functions

 BitmapInfo ()
 Výchozí konstruktor, vytvoří neplatnou nulovou bitmapu.
 
 BitmapInfo (int width, int height, ChannelCount channelCount, Depth depth, ColorMode colorMode, boolean premultiplied)
 Konstruktor pro rychlé přiřazení hodnot.
 
 BitmapInfo (BitmapInfo other)
 Kopírovací konstruktor.
 
boolean isValid ()
 Kontroluje, jestli jsou všechny parametry platné, nikoliv však jeslti je kombinace platná.
 
Rect getRect ()
 Vrací obdélník s rozměry bitmapy.
 
NativeType getNativeType ()
 Vrací nativní typ, který odpovídá dané kombinaci parametrů.
 

Public Attributes

int width = 0
 
int height = 0
 
boolean premultiplied = false
 
ChannelCount channelCount = ChannelCount.INVALID_COUNT
 
Depth depth = Depth.INVALID_DEPTH
 
ColorMode colorMode = ColorMode.INVALID_COLOR_MODE
 

Detailed Description

Struktura obsahující informace o bitmapě.

Definition at line 8 of file BitmapInfo.java.

Constructor & Destructor Documentation

mhr.appcore.bitmap.BitmapInfo.BitmapInfo ( )
inline

Výchozí konstruktor, vytvoří neplatnou nulovou bitmapu.

Definition at line 19 of file BitmapInfo.java.

{
}
mhr.appcore.bitmap.BitmapInfo.BitmapInfo ( int  width,
int  height,
ChannelCount  channelCount,
Depth  depth,
ColorMode  colorMode,
boolean  premultiplied 
)
inline

Konstruktor pro rychlé přiřazení hodnot.

Parameters
width
height
channelCount
depth
colorMode
premultiplied

Definition at line 31 of file BitmapInfo.java.

mhr.appcore.bitmap.BitmapInfo.BitmapInfo ( BitmapInfo  other)
inline

Kopírovací konstruktor.

Parameters
other

Definition at line 44 of file BitmapInfo.java.

{
this.width = other.width;
this.height = other.height;
this.premultiplied = other.premultiplied;
this.channelCount = other.channelCount;
this.depth = other.depth;
this.colorMode = other.colorMode;
}

Member Function Documentation

NativeType mhr.appcore.bitmap.BitmapInfo.getNativeType ( )
inline

Vrací nativní typ, který odpovídá dané kombinaci parametrů.

   Vrací nativní typ, který odpovídá dané kombinaci parametrů. Pokud je nějaký paramter neplatný, kombinace neplatná, nebo rozměr neplatný, vrací neplatný typ.
Returns

Definition at line 79 of file BitmapInfo.java.

{
if (width > 0 && height > 0) {
if (channelCount == ChannelCount.SINGLE_CHANNEL && colorMode == ColorMode.MONO) {
if (depth == Depth.DEPTH_8_BIT) {
return NativeType.MONO_8_BIT;
}
} else if (channelCount == ChannelCount.FOUR_CHANNEL && colorMode != ColorMode.INVALID_COLOR_MODE && colorMode != ColorMode.MONO) {
if (depth == Depth.DEPTH_8_BIT) {
return NativeType.RGBA_8_BIT;
}
}
}
return NativeType.INVALID_TYPE;
}
Rect mhr.appcore.bitmap.BitmapInfo.getRect ( )
inline

Vrací obdélník s rozměry bitmapy.

Returns

Definition at line 69 of file BitmapInfo.java.

{
return new Rect(width, height);
}
boolean mhr.appcore.bitmap.BitmapInfo.isValid ( )
inline

Kontroluje, jestli jsou všechny parametry platné, nikoliv však jeslti je kombinace platná.

Returns

Definition at line 57 of file BitmapInfo.java.

{
if (width > 0 && height > 0 && channelCount != ChannelCount.INVALID_COUNT && depth != Depth.INVALID_DEPTH && colorMode != ColorMode.INVALID_COLOR_MODE) {
return true;
} else {
return false;
}
}

Member Data Documentation

ChannelCount mhr.appcore.bitmap.BitmapInfo.channelCount = ChannelCount.INVALID_COUNT

Definition at line 12 of file BitmapInfo.java.

ColorMode mhr.appcore.bitmap.BitmapInfo.colorMode = ColorMode.INVALID_COLOR_MODE

Definition at line 14 of file BitmapInfo.java.

Depth mhr.appcore.bitmap.BitmapInfo.depth = Depth.INVALID_DEPTH

Definition at line 13 of file BitmapInfo.java.

int mhr.appcore.bitmap.BitmapInfo.height = 0

Definition at line 10 of file BitmapInfo.java.

boolean mhr.appcore.bitmap.BitmapInfo.premultiplied = false

Definition at line 11 of file BitmapInfo.java.

int mhr.appcore.bitmap.BitmapInfo.width = 0

Definition at line 9 of file BitmapInfo.java.


The documentation for this class was generated from the following file: