* Minor changes due to the fact that LayerData::font member is allocated on stack now...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4686 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2003-09-15 19:07:45 +00:00
parent b81089db11
commit 957320d114
4 changed files with 28 additions and 28 deletions

View File

@ -349,14 +349,14 @@ void AccelerantDriver::DrawBitmap(ServerBitmap *bmp, BRect src, BRect dest, Laye
*/
void AccelerantDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta)
{
if(!string || !d || !d->font)
if(!string || !d)
return;
Lock();
pt.y--; // because of Be's backward compatibility hack
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -2479,11 +2479,11 @@ bool AccelerantDriver::DumpToFile(const char *path)
*/
float AccelerantDriver::StringWidth(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d)
return 0.0;
Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -2564,11 +2564,11 @@ float AccelerantDriver::StringWidth(const char *string, int32 length, LayerData
*/
float AccelerantDriver::StringHeight(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d)
return 0.0;
Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)

View File

@ -1502,11 +1502,11 @@ void BitmapDriver::InvertRect(BRect r)
float BitmapDriver::StringWidth(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d )
return 0.0;
Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -1575,11 +1575,11 @@ float BitmapDriver::StringWidth(const char *string, int32 length, LayerData *d)
float BitmapDriver::StringHeight(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d)
return 0.0;
Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -1646,14 +1646,14 @@ float BitmapDriver::StringHeight(const char *string, int32 length, LayerData *d)
*/
void BitmapDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta)
{
if(!string || !d || !d->font)
if(!string || !d)
return;
Lock();
pt.y--; // because of Be's backward compatibility hack
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)

View File

@ -867,12 +867,12 @@ void ScreenDriver::SetLayerData(LayerData *d, bool set_font_data)
if(set_font_data)
{
BFont font;
ServerFont *sf=d->font;
ServerFont *sf=&(d->font);
if(!sf)
return;
FontStyle *style=d->font->Style();
FontStyle *style=d->font.Style();
if(!style)
return;
@ -896,11 +896,11 @@ void ScreenDriver::SetLayerData(LayerData *d, bool set_font_data)
float ScreenDriver::StringWidth(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d)
return 0.0;
screenwin->Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -960,11 +960,11 @@ float ScreenDriver::StringWidth(const char *string, int32 length, LayerData *d)
float ScreenDriver::StringHeight(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d)
return 0.0;
screenwin->Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -1010,13 +1010,13 @@ float ScreenDriver::StringHeight(const char *string, int32 length, LayerData *d)
void ScreenDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta)
{
if(!string || !d || !d->font)
if(!string || !d)
return;
screenwin->Lock();
pt.y--; // because of Be's backward compatibility hack
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)

View File

@ -1181,12 +1181,12 @@ void ViewDriver::SetLayerData(LayerData *d, bool set_font_data)
if(set_font_data)
{
BFont font;
ServerFont *sf=d->font;
ServerFont *sf=&(d->font);
if(!sf)
return;
FontStyle *style=d->font->Style();
FontStyle *style=d->font.Style();
if(!style)
return;
@ -1210,11 +1210,11 @@ void ViewDriver::SetLayerData(LayerData *d, bool set_font_data)
float ViewDriver::StringWidth(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d )
return 0.0;
screenwin->Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -1274,11 +1274,11 @@ float ViewDriver::StringWidth(const char *string, int32 length, LayerData *d)
float ViewDriver::StringHeight(const char *string, int32 length, LayerData *d)
{
if(!string || !d || !d->font)
if(!string || !d )
return 0.0;
screenwin->Lock();
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)
@ -1324,13 +1324,13 @@ float ViewDriver::StringHeight(const char *string, int32 length, LayerData *d)
void ViewDriver::DrawString(const char *string, int32 length, BPoint pt, LayerData *d, escapement_delta *edelta)
{
if(!string || !d || !d->font)
if(!string || !d )
return;
screenwin->Lock();
pt.y--; // because of Be's backward compatibility hack
ServerFont *font=d->font;
ServerFont *font=&(d->font);
FontStyle *style=font->Style();
if(!style)