BView*
FontDemoView::_GetView(BRect rect)
{
	if (!fBitmap || fBitmap->Bounds() != rect)
		_NewBitmap(rect);

	fBitmap->Lock();
	return fBitmap->ChildAt(0);
}
Beispiel #2
0
FontDemoView::FontDemoView(BRect rect)
	: BView(rect, "FontDemoView", B_FOLLOW_ALL, B_WILL_DRAW | B_FRAME_EVENTS),
	fBitmap(NULL),
	fBufferView(NULL),
	fString(NULL),
	fFontSize(50.0),
	fSpacing(0.0),
	fOutLineLevel(0),
	fDrawingMode(B_OP_COPY),
	fBoundingBoxes(false),
	fDrawShapes(false),
	fShapes(NULL)
{
	SetViewColor(B_TRANSPARENT_COLOR);
	SetString("Haiku, Inc.");
	SetFontSize(fFontSize);
	SetAntialiasing(true);

	_NewBitmap(Bounds());
}