From b1af0a7a247358c80de46e5400f572d2f00fca3a Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 10 Sep 2007 10:20:26 +0000 Subject: [PATCH] Setting the font shear in a BPicture didn't work, because the value was treated as uint32 in some places, when it's a float. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22214 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/interface/PictureDataWriter.h | 2 +- src/kits/interface/PictureDataWriter.cpp | 4 ++-- src/servers/app/ServerPicture.cpp | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/headers/private/interface/PictureDataWriter.h b/headers/private/interface/PictureDataWriter.h index a2672e0cf0..9ee519d6bc 100644 --- a/headers/private/interface/PictureDataWriter.h +++ b/headers/private/interface/PictureDataWriter.h @@ -45,7 +45,7 @@ public: status_t WriteSetFontRotation(const float &rotation); status_t WriteSetFontEncoding(const int32 &encoding); status_t WriteSetFontFlags(const int32 &flags); - status_t WriteSetFontShear(const int32 &shear); + status_t WriteSetFontShear(const float &shear); status_t WriteSetFontFace(const int32 &face); status_t WriteStrokeLine(const BPoint &start, const BPoint &end); diff --git a/src/kits/interface/PictureDataWriter.cpp b/src/kits/interface/PictureDataWriter.cpp index 8d459adce9..b03916a6ae 100644 --- a/src/kits/interface/PictureDataWriter.cpp +++ b/src/kits/interface/PictureDataWriter.cpp @@ -524,11 +524,11 @@ PictureDataWriter::WriteSetFontFlags(const int32 &flags) status_t -PictureDataWriter::WriteSetFontShear(const int32 &shear) +PictureDataWriter::WriteSetFontShear(const float &shear) { try { BeginOp(B_PIC_SET_FONT_SHEAR); - Write(shear); + Write(shear); EndOp(); } catch (status_t &status) { return status; diff --git a/src/servers/app/ServerPicture.cpp b/src/servers/app/ServerPicture.cpp index 55a1e07a20..dcca8e6f07 100644 --- a/src/servers/app/ServerPicture.cpp +++ b/src/servers/app/ServerPicture.cpp @@ -858,10 +858,8 @@ ServerPicture::SetFontFromLink(BPrivate::LinkReceiver& link) if (mask & B_FONT_SHEAR) { float shear; - link.Read(&shear); - // TODO: For some reason writing the font shear - // results in missing font in Chart's BPictureButtons. Investigate. - //WriteSetFontShear(shear); + link.Read(&shear); + WriteSetFontShear(shear); } if (mask & B_FONT_ROTATION) {