From a1a5f1241f75153e6cde1361d443c64240c0c207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 27 Apr 2008 18:35:59 +0000 Subject: [PATCH] only set shear and rotation with valid values git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25220 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/View.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index f0c19d563b..218179b341 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -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