added a comment about how it would be nice if ServerFont could be guaranteed to be valid (ie it doesn't crash if you call one of it's functions from outside code, I like it when a C++ class is an encapsulated object, maintaining a valid internal state, and whatever client code does, it should just never crash)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12390 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
53ca92129f
commit
a52667ee9c
@ -39,6 +39,12 @@ public:
|
||||
uint16 flags=0, uint8 spacing=B_CHAR_SPACING);
|
||||
ServerFont(const ServerFont &font);
|
||||
~ServerFont(void);
|
||||
|
||||
// TODO: make more advanced...
|
||||
status_t InitCheck() const
|
||||
{ return fStyle ? B_OK : B_NO_INIT; }
|
||||
|
||||
|
||||
font_direction Direction(void) const { return fDirection; }
|
||||
uint32 Encoding(void) const { return fEncoding; }
|
||||
edge_info Edges(void) const { return fEdges; }
|
||||
|
@ -57,6 +57,10 @@ ServerFont::ServerFont(FontStyle *style, float size, float rotation, float shear
|
||||
fStyle->AddDependent();
|
||||
}
|
||||
|
||||
// TODO: fStyle should not be NULL. There should be another FontStyle
|
||||
// constructor, that initializes without actually interfacing with
|
||||
// freetype, so that a ServerFont can be guaranteed to be "valid".
|
||||
|
||||
ServerFont::ServerFont(void)
|
||||
{
|
||||
fStyle=NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user