btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / mediaplayer / interface / SubtitleBitmap.h
blobaee2b97157452614a5ab3bf28b034ba1d6b16138
1 /*
2 * Copyright 2010, Stephan Aßmus <superstippi@gmx.de>.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef SUBTITLE_BITMAP_H
6 #define SUBTITLE_BITMAP_H
9 #include <Rect.h>
10 #include <String.h>
13 class BBitmap;
14 class BTextView;
17 class SubtitleBitmap {
18 public:
19 SubtitleBitmap();
20 virtual ~SubtitleBitmap();
22 bool SetText(const char* text);
23 void SetVideoBounds(BRect bounds);
24 void SetOverlayMode(bool overlayMode);
25 void SetCharsPerLine(float charsPerLine);
27 const BBitmap* Bitmap() const;
29 private:
30 void _GenerateBitmap();
31 void _InsertText(BRect& bounds,
32 float& outlineRadius, bool overlayMode);
34 private:
35 BBitmap* fBitmap;
36 BTextView* fTextView;
37 BTextView* fShadowTextView;
38 BString fText;
40 BRect fVideoBounds;
41 float fCharsPerLine;
42 bool fUseSoftShadow;
43 bool fOverlayMode;
47 #endif // SUBTITLE_BITMAP_H