Add SetBitmap(const char*) method to set the bitmap from a file using the Translation Kit.
This commit is contained in:
parent
c777593fa7
commit
bcbff8db1f
|
@ -51,6 +51,14 @@ BitmapView::Bitmap() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BitmapView::SetBitmap(const char* filename)
|
||||||
|
{
|
||||||
|
delete fBitmap;
|
||||||
|
fBitmap = BTranslationUtils::GetBitmap(filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BitmapView::SetBitmap(BBitmap* bitmap)
|
BitmapView::SetBitmap(BBitmap* bitmap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2009, Pier Luigi Fiorini. All rights reserved.
|
* Copyright 2009-2010, Pier Luigi Fiorini. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _BITMAP_VIEW_H
|
#ifndef _BITMAP_VIEW_H
|
||||||
|
@ -18,6 +18,7 @@ public:
|
||||||
status_t InitCheck();
|
status_t InitCheck();
|
||||||
|
|
||||||
BBitmap* Bitmap() const;
|
BBitmap* Bitmap() const;
|
||||||
|
void SetBitmap(const char* filename);
|
||||||
void SetBitmap(BBitmap* bitmap);
|
void SetBitmap(BBitmap* bitmap);
|
||||||
|
|
||||||
virtual BSize MinSize();
|
virtual BSize MinSize();
|
||||||
|
|
Ŝarĝante…
Reference in New Issue