LibreOffice Module starmath (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SmRect Class Reference

#include <rect.hxx>

Inheritance diagram for SmRect:
[legend]
Collaboration diagram for SmRect:
[legend]

Public Member Functions

 SmRect ()
 
 SmRect (const OutputDevice &rDev, const SmFormat *pFormat, const OUString &rText, sal_uInt16 nBorderWidth)
 
 SmRect (tools::Long nWidth, tools::Long nHeight)
 
sal_uInt16 GetBorderWidth () const
 
void SetItalicSpaces (tools::Long nLeftSpace, tools::Long nRightSpace)
 
void SetWidth (sal_uLong nWidth)
 
void SetLeft (tools::Long nLeft)
 
void SetRight (tools::Long nRight)
 
void SetBottom (tools::Long nBottom)
 
void SetTop (tools::Long nTop)
 
const PointGetTopLeft () const
 
tools::Long GetTop () const
 
tools::Long GetLeft () const
 
tools::Long GetBottom () const
 
tools::Long GetRight () const
 
tools::Long GetCenterY () const
 
tools::Long GetWidth () const
 
tools::Long GetHeight () const
 
tools::Long GetItalicLeftSpace () const
 
tools::Long GetItalicRightSpace () const
 
tools::Long GetHiAttrFence () const
 
tools::Long GetLoAttrFence () const
 
tools::Long GetItalicLeft () const
 
tools::Long GetItalicCenterX () const
 
tools::Long GetItalicRight () const
 
tools::Long GetItalicWidth () const
 
bool HasBaseline () const
 
tools::Long GetBaseline () const
 
tools::Long GetBaselineOffset () const
 
tools::Long GetAlignT () const
 
tools::Long GetAlignM () const
 
tools::Long GetAlignB () const
 
const SizeGetSize () const
 
Size GetItalicSize () const
 
void Move (const Point &rPosition)
 
void MoveTo (const Point &rPosition)
 
bool IsEmpty () const
 
bool HasAlignInfo () const
 
Point AlignTo (const SmRect &rRect, RectPos ePos, RectHorAlign eHor, RectVerAlign eVer) const
 
SmRectExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode)
 
void ExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, tools::Long nNewAlignM)
 
SmRectExtendBy (const SmRect &rRect, RectCopyMBL eCopyMode, bool bKeepVerAlignParams)
 
tools::Long OrientedDist (const Point &rPoint) const
 
bool IsInsideRect (const Point &rPoint) const
 
bool IsInsideItalicRect (const Point &rPoint) const
 
tools::Rectangle AsRectangle () const
 
SmRect AsGlyphRect () const
 

Private Member Functions

void CopyMBL (const SmRect &rRect)
 
void CopyAlignInfo (const SmRect &rRect)
 
void Union (const SmRect &rRect)
 Italic correction is NOT taken into account here! More...
 

Private Attributes

Point aTopLeft
 
Size aSize
 
tools::Long nBaseline
 
tools::Long nAlignT
 
tools::Long nAlignM
 
tools::Long nAlignB
 
tools::Long nGlyphTop
 
tools::Long nGlyphBottom
 
tools::Long nItalicLeftSpace
 
tools::Long nItalicRightSpace
 
tools::Long nLoAttrFence
 
tools::Long nHiAttrFence
 
sal_uInt16 nBorderWidth
 
bool bHasBaseline
 
bool bHasAlignInfo
 

Detailed Description

Definition at line 83 of file rect.hxx.

Constructor & Destructor Documentation

◆ SmRect() [1/3]

SmRect::SmRect ( )

◆ SmRect() [2/3]

SmRect::SmRect ( const OutputDevice rDev,
const SmFormat pFormat,
const OUString &  rText,
sal_uInt16  nBorderWidth 
)

◆ SmRect() [3/3]

SmRect::SmRect ( tools::Long  nWidth,
tools::Long  nHeight 
)

Member Function Documentation

◆ AlignTo()

Point SmRect::AlignTo ( const SmRect rRect,
RectPos  ePos,
RectHorAlign  eHor,
RectVerAlign  eVer 
) const

◆ AsGlyphRect()

SmRect SmRect::AsGlyphRect ( ) const

Definition at line 613 of file rect.cxx.

References nGlyphBottom, nGlyphTop, SetBottom(), and SetTop().

Referenced by SmGlyphSpecialNode::Arrange().

◆ AsRectangle()

tools::Rectangle SmRect::AsRectangle ( ) const
inline

◆ CopyAlignInfo()

void SmRect::CopyAlignInfo ( const SmRect rRect)
private

Definition at line 165 of file rect.cxx.

References bHasAlignInfo, bHasBaseline, nAlignB, nAlignM, nAlignT, nBaseline, nHiAttrFence, and nLoAttrFence.

Referenced by ExtendBy().

◆ CopyMBL()

void SmRect::CopyMBL ( const SmRect rRect)
inlineprivate

Definition at line 195 of file rect.hxx.

References bHasBaseline, nAlignM, and nBaseline.

Referenced by ExtendBy().

◆ ExtendBy() [1/3]

SmRect & SmRect::ExtendBy ( const SmRect rRect,
RectCopyMBL  eCopyMode 
)

◆ ExtendBy() [2/3]

SmRect & SmRect::ExtendBy ( const SmRect rRect,
RectCopyMBL  eCopyMode,
bool  bKeepVerAlignParams 
)

depends not on 'HasBaseline'

Definition at line 525 of file rect.cxx.

References bHasAlignInfo, ExtendBy(), GetAlignB(), GetAlignM(), GetAlignT(), HasAlignInfo(), nAlignB, nAlignM, nAlignT, and nBaseline.

◆ ExtendBy() [3/3]

void SmRect::ExtendBy ( const SmRect rRect,
RectCopyMBL  eCopyMode,
tools::Long  nNewAlignM 
)

Definition at line 511 of file rect.cxx.

References ExtendBy(), HasAlignInfo(), and nAlignM.

◆ GetAlignB()

tools::Long SmRect::GetAlignB ( ) const
inline

Definition at line 151 of file rect.hxx.

References nAlignB.

Referenced by AlignTo(), SmSubSupNode::Arrange(), ExtendBy(), and SmRect().

◆ GetAlignM()

tools::Long SmRect::GetAlignM ( ) const
inline

Definition at line 150 of file rect.hxx.

References nAlignM.

Referenced by AlignTo(), SmTableNode::Arrange(), and ExtendBy().

◆ GetAlignT()

tools::Long SmRect::GetAlignT ( ) const
inline

Definition at line 149 of file rect.hxx.

References nAlignT.

Referenced by AlignTo(), SmSubSupNode::Arrange(), and ExtendBy().

◆ GetBaseline()

tools::Long SmRect::GetBaseline ( ) const
inline

Definition at line 204 of file rect.hxx.

References HasBaseline(), nBaseline, and SAL_WARN_IF.

Referenced by AlignTo(), SmTableNode::Arrange(), and GetBaselineOffset().

◆ GetBaselineOffset()

tools::Long SmRect::GetBaselineOffset ( ) const
inline

Definition at line 147 of file rect.hxx.

References GetBaseline(), and GetTop().

Referenced by SmDrawingVisitor::DrawTextNode().

◆ GetBorderWidth()

sal_uInt16 SmRect::GetBorderWidth ( ) const
inline

◆ GetBottom()

tools::Long SmRect::GetBottom ( ) const
inline

◆ GetCenterY()

tools::Long SmRect::GetCenterY ( ) const
inline

Definition at line 130 of file rect.hxx.

References GetBottom(), and GetTop().

Referenced by AlignTo().

◆ GetHeight()

tools::Long SmRect::GetHeight ( ) const
inline

◆ GetHiAttrFence()

tools::Long SmRect::GetHiAttrFence ( ) const
inline

Definition at line 137 of file rect.hxx.

References nHiAttrFence.

Referenced by AlignTo(), and ExtendBy().

◆ GetItalicCenterX()

tools::Long SmRect::GetItalicCenterX ( ) const
inline

Definition at line 141 of file rect.hxx.

References GetItalicLeft(), and GetItalicRight().

Referenced by AlignTo(), and SmMatrixNode::Arrange().

◆ GetItalicLeft()

tools::Long SmRect::GetItalicLeft ( ) const
inline

◆ GetItalicLeftSpace()

tools::Long SmRect::GetItalicLeftSpace ( ) const
inline

Definition at line 134 of file rect.hxx.

References nItalicLeftSpace.

Referenced by AlignTo(), GetItalicLeft(), GetItalicWidth(), and SmGraphicWidget::SetCursor().

◆ GetItalicRight()

tools::Long SmRect::GetItalicRight ( ) const
inline

◆ GetItalicRightSpace()

tools::Long SmRect::GetItalicRightSpace ( ) const
inline

Definition at line 135 of file rect.hxx.

References nItalicRightSpace.

Referenced by AlignTo(), GetItalicRight(), and GetItalicWidth().

◆ GetItalicSize()

Size SmRect::GetItalicSize ( ) const
inline

Definition at line 155 of file rect.hxx.

References GetHeight(), and GetItalicWidth().

Referenced by AsRectangle(), and SmGraphicWidget::SetCursor().

◆ GetItalicWidth()

tools::Long SmRect::GetItalicWidth ( ) const
inline

◆ GetLeft()

tools::Long SmRect::GetLeft ( ) const
inline

◆ GetLoAttrFence()

tools::Long SmRect::GetLoAttrFence ( ) const
inline

Definition at line 138 of file rect.hxx.

References nLoAttrFence.

Referenced by AlignTo(), and ExtendBy().

◆ GetRight()

tools::Long SmRect::GetRight ( ) const
inline

◆ GetSize()

const Size & SmRect::GetSize ( ) const
inline

◆ GetTop()

tools::Long SmRect::GetTop ( ) const
inline

◆ GetTopLeft()

const Point & SmRect::GetTopLeft ( ) const
inline

◆ GetWidth()

tools::Long SmRect::GetWidth ( ) const
inline

◆ HasAlignInfo()

bool SmRect::HasAlignInfo ( ) const
inline

Definition at line 166 of file rect.hxx.

References bHasAlignInfo.

Referenced by ExtendBy().

◆ HasBaseline()

bool SmRect::HasBaseline ( ) const
inline

Definition at line 145 of file rect.hxx.

References bHasBaseline.

Referenced by AlignTo(), SmTableNode::Arrange(), ExtendBy(), and GetBaseline().

◆ IsEmpty()

bool SmRect::IsEmpty ( ) const
inline

Definition at line 161 of file rect.hxx.

References GetHeight(), and GetWidth().

Referenced by SmRect(), and Union().

◆ IsInsideItalicRect()

bool SmRect::IsInsideItalicRect ( const Point rPoint) const

Definition at line 605 of file rect.cxx.

References GetBottom(), GetItalicLeft(), GetItalicRight(), GetTop(), Point::X(), and Point::Y().

◆ IsInsideRect()

bool SmRect::IsInsideRect ( const Point rPoint) const

Definition at line 596 of file rect.cxx.

References GetBottom(), GetLeft(), GetRight(), GetTop(), Point::X(), and Point::Y().

Referenced by SmNode::FindRectClosestTo().

◆ Move()

void SmRect::Move ( const Point rPosition)

◆ MoveTo()

void SmRect::MoveTo ( const Point rPosition)
inline

Definition at line 159 of file rect.hxx.

References GetTopLeft(), and Move().

Referenced by SmBracebodyNode::Arrange().

◆ OrientedDist()

tools::Long SmRect::OrientedDist ( const Point rPoint) const

◆ SetBottom()

void SmRect::SetBottom ( tools::Long  nBottom)

Definition at line 301 of file rect.cxx.

References aSize, GetTop(), and Size::setHeight().

Referenced by AsGlyphRect(), SmRect(), and Union().

◆ SetItalicSpaces()

void SmRect::SetItalicSpaces ( tools::Long  nLeftSpace,
tools::Long  nRightSpace 
)
inline

Definition at line 186 of file rect.hxx.

References nItalicLeftSpace, and nItalicRightSpace.

Referenced by SmLineNode::Arrange(), SmBlankNode::Arrange(), and ExtendBy().

◆ SetLeft()

void SmRect::SetLeft ( tools::Long  nLeft)

Definition at line 285 of file rect.cxx.

References aSize, aTopLeft, GetRight(), Size::setWidth(), and Point::setX().

Referenced by Union().

◆ SetRight()

void SmRect::SetRight ( tools::Long  nRight)

Definition at line 294 of file rect.cxx.

References aSize, GetLeft(), and Size::setWidth().

Referenced by Union().

◆ SetTop()

void SmRect::SetTop ( tools::Long  nTop)

Definition at line 308 of file rect.cxx.

References aSize, aTopLeft, GetBottom(), Size::setHeight(), and Point::setY().

Referenced by AsGlyphRect(), SmRect(), and Union().

◆ SetWidth()

void SmRect::SetWidth ( sal_uLong  nWidth)
inline

Definition at line 117 of file rect.hxx.

References aSize, and Size::setWidth().

Referenced by SmLineNode::Arrange(), and SmBlankNode::Arrange().

◆ Union()

void SmRect::Union ( const SmRect rRect)
private

Italic correction is NOT taken into account here!

Definition at line 420 of file rect.cxx.

References GetBottom(), GetLeft(), GetRight(), GetTop(), IsEmpty(), nGlyphBottom, nGlyphTop, SetBottom(), SetLeft(), SetRight(), and SetTop().

Referenced by ExtendBy().

Member Data Documentation

◆ aSize

Size SmRect::aSize
private

Definition at line 86 of file rect.hxx.

Referenced by GetSize(), SetBottom(), SetLeft(), SetRight(), SetTop(), and SetWidth().

◆ aTopLeft

Point SmRect::aTopLeft
private

Definition at line 85 of file rect.hxx.

Referenced by GetTopLeft(), Move(), SetLeft(), and SetTop().

◆ bHasAlignInfo

bool SmRect::bHasAlignInfo
private

Definition at line 99 of file rect.hxx.

Referenced by CopyAlignInfo(), ExtendBy(), HasAlignInfo(), and SmRect().

◆ bHasBaseline

bool SmRect::bHasBaseline
private

Definition at line 98 of file rect.hxx.

Referenced by CopyAlignInfo(), CopyMBL(), ExtendBy(), HasBaseline(), and SmRect().

◆ nAlignB

tools::Long SmRect::nAlignB
private

Definition at line 90 of file rect.hxx.

Referenced by CopyAlignInfo(), ExtendBy(), GetAlignB(), Move(), and SmRect().

◆ nAlignM

tools::Long SmRect::nAlignM
private

Definition at line 89 of file rect.hxx.

Referenced by CopyAlignInfo(), CopyMBL(), ExtendBy(), GetAlignM(), Move(), and SmRect().

◆ nAlignT

tools::Long SmRect::nAlignT
private

Definition at line 88 of file rect.hxx.

Referenced by CopyAlignInfo(), ExtendBy(), GetAlignT(), Move(), and SmRect().

◆ nBaseline

tools::Long SmRect::nBaseline
private

Definition at line 87 of file rect.hxx.

Referenced by CopyAlignInfo(), CopyMBL(), ExtendBy(), GetBaseline(), Move(), and SmRect().

◆ nBorderWidth

sal_uInt16 SmRect::nBorderWidth
private

Definition at line 97 of file rect.hxx.

Referenced by GetBorderWidth(), and SmRect().

◆ nGlyphBottom

tools::Long SmRect::nGlyphBottom
private

Definition at line 92 of file rect.hxx.

Referenced by AsGlyphRect(), Move(), SmRect(), and Union().

◆ nGlyphTop

tools::Long SmRect::nGlyphTop
private

Definition at line 91 of file rect.hxx.

Referenced by AsGlyphRect(), Move(), SmRect(), and Union().

◆ nHiAttrFence

tools::Long SmRect::nHiAttrFence
private

Definition at line 96 of file rect.hxx.

Referenced by CopyAlignInfo(), ExtendBy(), GetHiAttrFence(), Move(), and SmRect().

◆ nItalicLeftSpace

tools::Long SmRect::nItalicLeftSpace
private

Definition at line 93 of file rect.hxx.

Referenced by GetItalicLeftSpace(), SetItalicSpaces(), and SmRect().

◆ nItalicRightSpace

tools::Long SmRect::nItalicRightSpace
private

Definition at line 94 of file rect.hxx.

Referenced by GetItalicRightSpace(), SetItalicSpaces(), and SmRect().

◆ nLoAttrFence

tools::Long SmRect::nLoAttrFence
private

Definition at line 95 of file rect.hxx.

Referenced by CopyAlignInfo(), ExtendBy(), GetLoAttrFence(), Move(), and SmRect().


The documentation for this class was generated from the following files: