2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Mikael Konradson, mikael.konradson@gmail.com
8 #ifndef FONT_DEMO_VIEW_H
9 #define FONT_DEMO_VIEW_H
20 class FontDemoView
: public BView
{
22 FontDemoView(BRect rect
);
23 virtual ~FontDemoView();
25 virtual void Draw(BRect updateRect
);
26 virtual void MessageReceived(BMessage
* message
);
27 virtual void FrameResized(float width
, float height
);
29 virtual void SetFontSize(float size
);
30 const float FontSize() const { return fFont
.Size(); }
32 void SetDrawBoundingBoxes(bool state
);
33 bool BoundingBoxes() const { return fBoundingBoxes
; }
35 void SetFontShear(float shear
);
36 const float Shear() const { return fFont
.Shear(); }
38 void SetFontRotation(float rotation
);
39 const float Rotation() const { return fFont
.Rotation(); }
41 void SetString(BString string
);
42 BString
String() const;
44 void SetAntialiasing(bool state
);
46 void SetSpacing(float space
);
47 const float Spacing() const { return fSpacing
; }
49 void SetOutlineLevel(int8 outline
);
50 const int8
OutLineLevel() const { return fOutLineLevel
; }
53 void _AddShapes(BString string
);
54 void _DrawView(BView
* view
);
56 BView
* _GetView(BRect rect
);
57 void _NewBitmap(BRect rect
);
66 drawing_mode fDrawingMode
;
75 #endif // FONT_DEMO_VIEW_H