* added a way to get the unscaled pensize (ie that of the current draw state
of a view) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -496,6 +496,18 @@ DrawState::PenSize() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! returns the unscaled pen size
|
||||||
|
float
|
||||||
|
DrawState::UnscaledPenSize() const
|
||||||
|
{
|
||||||
|
// NOTE: As documented in the BeBook,
|
||||||
|
// pen size is never smaller than 1.0.
|
||||||
|
// This is supposed to be the smallest
|
||||||
|
// possible device size.
|
||||||
|
return max_c(fPenSize, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! sets the font to be already scaled by fScale
|
//! sets the font to be already scaled by fScale
|
||||||
void
|
void
|
||||||
DrawState::SetFont(const ServerFont& font, uint32 flags)
|
DrawState::SetFont(const ServerFont& font, uint32 flags)
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ class DrawState {
|
|||||||
|
|
||||||
void SetPenSize(float size);
|
void SetPenSize(float size);
|
||||||
float PenSize() const;
|
float PenSize() const;
|
||||||
|
float UnscaledPenSize() const;
|
||||||
|
|
||||||
// font
|
// font
|
||||||
void SetFont(const ServerFont& font,
|
void SetFont(const ServerFont& font,
|
||||||
|
|||||||
Reference in New Issue
Block a user