App

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mhr.appandroid.views.SimpleBitmapView Class Reference

Třída pro jednoduché zobrazení 1ch a 4ch bitmap, umožňuje pouze nastavit paint pozadí a popředí. More...

Inheritance diagram for mhr.appandroid.views.SimpleBitmapView:

## Public Member Functions
| SimpleBitmapView (Context context)
| SimpleBitmapView (Context context, AttributeSet attrs)
| SimpleBitmapView (Context context, AttributeSet attrs, int defStyle)
Paint | getBitmapBackground ()
| Vrátí instanci Paint, která se použije pro vyplnění pozadí View před vykreslením MaskCanvasu.
Paint | getBitmapForeground ()
| Vrátí instanci Paint, která se použije pro vykreslení bitmapy.
void | setBitmapForeground (Paint paint)
| Nastaví Paint pro vykreslení bitmapy.
void | setBitmap (Bitmap bitmap)
| Nastaví bitmapu pro vykreslování a překreslí se.
Rect | getDstRect ()
| Vrátí obdélník použitelný pro vykreslování - limit pro viditelnou oblast bitmapy.

## Protected Member Functions
void | init ()
| provede potřebné inicializace při vytvoření.
void | onDetachedFromWindow ()
void | onSizeChanged (int w, int h, int oldw, int oldh)
void | onDraw (Canvas canvas)

## Protected Attributes
Paint | background
Paint | foreground
Bitmap | bitmap = null
Rect | dstRect = null

## Detailed Description

Třída pro jednoduché zobrazení 1ch a 4ch bitmap, umožňuje pouze nastavit paint pozadí a popředí.

Definition at line 14 of file SimpleBitmapView.java.

## Constructor & Destructor Documentation

mhr.appandroid.views.SimpleBitmapView.SimpleBitmapView | ( | Context | context | ) |
| inline

Definition at line 46 of file SimpleBitmapView.java.

{
super(context);
init();
}

mhr.appandroid.views.SimpleBitmapView.SimpleBitmapView | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

Definition at line 51 of file SimpleBitmapView.java.

{
super(context, attrs);
init();
}

mhr.appandroid.views.SimpleBitmapView.SimpleBitmapView | ( | Context | context,
|  | AttributeSet | attrs,
|  | int | defStyle
| ) |  |
| inline

Definition at line 56 of file SimpleBitmapView.java.

{
super(context, attrs, defStyle);
init();
}

## Member Function Documentation

Paint mhr.appandroid.views.SimpleBitmapView.getBitmapBackground | ( |  | ) |
| inline

Vrátí instanci Paint, která se použije pro vyplnění pozadí View před vykreslením MaskCanvasu.

Returns

Definition at line 69 of file SimpleBitmapView.java.

{
return background;
}

Paint mhr.appandroid.views.SimpleBitmapView.getBitmapForeground | ( |  | ) |
| inline

Vrátí instanci Paint, která se použije pro vykreslení bitmapy.

Returns

Definition at line 77 of file SimpleBitmapView.java.

{
return foreground;
}

Rect mhr.appandroid.views.SimpleBitmapView.getDstRect | ( |  | ) |
| inline

Vrátí obdélník použitelný pro vykreslování - limit pro viditelnou oblast bitmapy.

Returns

Definition at line 102 of file SimpleBitmapView.java.

{
return new Rect(dstRect);
}

void mhr.appandroid.views.SimpleBitmapView.init | ( |  | ) |
| inlineprotected

provede potřebné inicializace při vytvoření.

Definition at line 33 of file SimpleBitmapView.java.

{
background = new Paint();
background.setColor(0xFFFFFFFF);
foreground = new Paint();
foreground.setColor(0xFF000000);
}

void mhr.appandroid.views.SimpleBitmapView.onDetachedFromWindow | ( |  | ) |
| inlineprotected

Definition at line 41 of file SimpleBitmapView.java.

{
// ignorovano kvuli male velikosti bitmapy a drag&drop, navic nebude vlastnikem bitmapy, ta bude sdilena
}

void mhr.appandroid.views.SimpleBitmapView.onDraw | ( | Canvas | canvas | ) |
| inlineprotected

Definition at line 113 of file SimpleBitmapView.java.

{
canvas.drawRect(dstRect, background);
if (bitmap != null) {
canvas.drawBitmap(bitmap, null, dstRect, foreground);
}
}

void mhr.appandroid.views.SimpleBitmapView.onSizeChanged | ( | int | w,
|  | int | h,
|  | int | oldw,
|  | int | oldh
| ) |  |
| inlineprotected

Definition at line 107 of file SimpleBitmapView.java.

{
super.onSizeChanged(w, h, oldw, oldh);
dstRect = new Rect(0 + getPaddingLeft(), 0 + getPaddingRight(), w - getPaddingRight(), h - getPaddingBottom());
}

void mhr.appandroid.views.SimpleBitmapView.setBitmap | ( | Bitmap | bitmap | ) |
| inline

Nastaví bitmapu pro vykreslování a překreslí se.

Parameters

  bitmap |

Definition at line 93 of file SimpleBitmapView.java.

{
this.bitmap = bitmap;
invalidate();
}

void mhr.appandroid.views.SimpleBitmapView.setBitmapForeground | ( | Paint | paint | ) |
| inline

Nastaví Paint pro vykreslení bitmapy.

Parameters

  paint |

Definition at line 85 of file SimpleBitmapView.java.

{
foreground = paint;
}

## Member Data Documentation

Paint mhr.appandroid.views.SimpleBitmapView.background
| protected

Definition at line 21 of file SimpleBitmapView.java.

Bitmap mhr.appandroid.views.SimpleBitmapView.bitmap = null
| protected

Definition at line 23 of file SimpleBitmapView.java.

Rect mhr.appandroid.views.SimpleBitmapView.dstRect = null
| protected

Definition at line 24 of file SimpleBitmapView.java.

Paint mhr.appandroid.views.SimpleBitmapView.foreground
| protected

Definition at line 22 of file SimpleBitmapView.java.

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

- /home/xxx/eclipse_workspaces/app/appandroid/src/mhr/appandroid/views/SimpleBitmapView.java