only set shear and rotation with valid values
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25220 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
05bc1e8973
commit
a1a5f1241f
@ -405,11 +405,13 @@ BView::BView(BMessage *archive)
|
||||
font.SetSize(size);
|
||||
|
||||
float shear;
|
||||
if (archive->FindFloat("_fflt", 1, &shear) == B_OK)
|
||||
if (archive->FindFloat("_fflt", 1, &shear) == B_OK
|
||||
&& shear >= 45.0 && shear <= 135.0)
|
||||
font.SetShear(shear);
|
||||
|
||||
float rotation;
|
||||
if (archive->FindFloat("_fflt", 2, &rotation) == B_OK)
|
||||
if (archive->FindFloat("_fflt", 2, &rotation) == B_OK
|
||||
&& rotation >=0 && rotation <= 360)
|
||||
font.SetRotation(rotation);
|
||||
|
||||
SetFont(&font, B_FONT_FAMILY_AND_STYLE | B_FONT_SIZE
|
||||
|
Loading…
Reference in New Issue
Block a user