BPicture: fix font shear storage

`SET_FONT_SHEAR` store shear angle in radians and relative to up
direction in BeOS. Formula of conversion from `BFont::SetShear()` to
`SET_FONT_SHEAR` value:

`pictShear = (fontShear - 90) * (M_PI / 180.0f)`.

Part of #1133.

Change-Id: I089c003e6509e519866d83dfe145e5b0226d32b1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10564
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
X512
2026-03-23 12:18:55 +00:00
committed by waddlesplash
parent 30a96490a0
commit 043ad4d92d
+2 -2
View File
@@ -911,7 +911,7 @@ void
CanvasCallbacks::SetFontShear(float shear)
{
ServerFont font;
font.SetShear(shear);
font.SetShear(shear * (180 / M_PI) + 90);
fCanvas->CurrentState()->SetFont(font, B_FONT_SHEAR);
}
@@ -1205,7 +1205,7 @@ ServerPicture::WriteFontState(const ServerFont& font, uint16 mask)
}
if (mask & B_FONT_SHEAR) {
WriteSetFontShear(font.Shear());
WriteSetFontShear((font.Shear() - 90) * (M_PI / 180));
}
if (mask & B_FONT_ROTATION) {