34 if ( nSide && !(nSide & 1) )
44 rRect.
Move( (nWidth-nSide)/2, (nHeight-nSide)/2 );
51 const tools::Long nSide = AdjustRectToSquare( nRect );
72 arrow.SetPoint(
Point( aCenter.
X(), nRect.
Top()), 0 );
73 arrow.SetPoint(
Point( aCenter.
X() - n2, nRect.
Top() + n2 ), 1 );
74 arrow.SetPoint(
Point( aCenter.
X() - n8, nRect.
Top() + n2 ), 2 );
75 arrow.SetPoint(
Point( aCenter.
X() - n8, nRect.
Bottom()), 3 );
76 arrow.SetPoint(
Point( aCenter.
X() + n8, nRect.
Bottom()), 4 );
77 arrow.SetPoint(
Point( aCenter.
X() + n8, nRect.
Top() + n2 ), 5 );
78 arrow.SetPoint(
Point( aCenter.
X() + n2, nRect.
Top() + n2 ), 6 );
89 arrow.SetPoint(
Point( aCenter.
X(), nRect.
Bottom()), 0 );
90 arrow.SetPoint(
Point( aCenter.
X() - n2, nRect.
Bottom() - n2 ), 1 );
91 arrow.SetPoint(
Point( aCenter.
X() - n8, nRect.
Bottom() - n2 ), 2 );
92 arrow.SetPoint(
Point( aCenter.
X() - n8, nRect.
Top()), 3 );
93 arrow.SetPoint(
Point( aCenter.
X() + n8, nRect.
Top()), 4 );
94 arrow.SetPoint(
Point( aCenter.
X() + n8, nRect.
Bottom() - n2 ), 5 );
95 arrow.SetPoint(
Point( aCenter.
X() + n2, nRect.
Bottom() - n2 ), 6 );
106 arrow.SetPoint(
Point( nRect.
Left(), aCenter.
Y()), 0 );
107 arrow.SetPoint(
Point( nRect.
Left() + n2, aCenter.
Y() - n2 ), 1 );
108 arrow.SetPoint(
Point( nRect.
Left() + n2, aCenter.
Y() - n8 ), 2 );
109 arrow.SetPoint(
Point( nRect.
Right(), aCenter.
Y() - n8 ), 3 );
110 arrow.SetPoint(
Point( nRect.
Right(), aCenter.
Y() + n8 ), 4 );
111 arrow.SetPoint(
Point( nRect.
Left() + n2, aCenter.
Y() + n8 ), 5 );
112 arrow.SetPoint(
Point( nRect.
Left() + n2, aCenter.
Y() + n2 ), 6 );
123 arrow.SetPoint(
Point( nRect.
Right(), aCenter.
Y()), 0 );
124 arrow.SetPoint(
Point( nRect.
Right() - n2, aCenter.
Y() - n2 ), 1 );
125 arrow.SetPoint(
Point( nRect.
Right() - n2, aCenter.
Y() - n8 ), 2 );
126 arrow.SetPoint(
Point( nRect.
Left(), aCenter.
Y() - n8 ), 3 );
127 arrow.SetPoint(
Point( nRect.
Left(), aCenter.
Y() + n8 ), 4 );
128 arrow.SetPoint(
Point( nRect.
Right() - n2, aCenter.
Y() + n8 ), 5 );
129 arrow.SetPoint(
Point( nRect.
Right() - n2, aCenter.
Y() + n2 ), 6 );
140 triangle.SetPoint(
Point( aCenter.
X(), nRect.
Top() + n4 ), 0 );
141 triangle.SetPoint(
Point( aCenter.
X() - n2, nRect.
Top() + n4 + n2 ), 1 );
142 triangle.SetPoint(
Point( aCenter.
X() + n2, nRect.
Top() + n4 + n2 ), 2 );
153 triangle.SetPoint(
Point( aCenter.
X(), nRect.
Bottom() - n4 ), 0 );
154 triangle.SetPoint(
Point( aCenter.
X() - n2, nRect.
Bottom() - n4 - n2 ), 1 );
155 triangle.SetPoint(
Point( aCenter.
X() + n2, nRect.
Bottom() - n4 - n2 ), 2 );
176 aTriangle.SetPoint(
Point(nRect.
Left() + n2, aCenter.
Y() - n2), 0);
177 aTriangle.SetPoint(
Point(nRect.
Left(), aCenter.
Y()), 1);
178 aTriangle.SetPoint(
Point(nRect.
Left() + n2, aCenter.
Y() + n2), 2);
202 aTriangle.SetPoint(
Point(nRect.
Right() - n2, aCenter.
Y() - n2), 0);
203 aTriangle.SetPoint(
Point(nRect.
Right(), aCenter.
Y()), 1);
204 aTriangle.SetPoint(
Point(nRect.
Right() - n2, aCenter.
Y() + n2), 2);
216 triangle.SetPoint(
Point( aCenter.
X(), nRect.
Top()), 0 );
217 triangle.SetPoint(
Point( aCenter.
X() - n2, nRect.
Top() + n2 ), 1 );
218 triangle.SetPoint(
Point( aCenter.
X() + n2, nRect.
Top() + n2 ), 2 );
222 triangle.Move( 0, n2 );
231 triangle.SetPoint(
Point( aCenter.
X(), nRect.
Bottom()), 0 );
232 triangle.SetPoint(
Point( aCenter.
X() - n2, nRect.
Bottom() - n2 ), 1 );
233 triangle.SetPoint(
Point( aCenter.
X() + n2, nRect.
Bottom() - n2 ), 2 );
237 triangle.Move( 0, -n2 );
255 const tools::Long diff = std::max<tools::Long>( 0, n8 - 1 );
259 cross.SetPoint(
Point( aCenter.
X() - diff, aCenter.
Y()), 2 );
263 cross.SetPoint(
Point( aCenter.
X(), aCenter.
Y() + diff ), 6 );
267 cross.SetPoint(
Point( aCenter.
X() + diff, aCenter.
Y()), 10 );
271 cross.SetPoint(
Point( aCenter.
X(), aCenter.
Y() - diff ), 14 );
290 checkmark.SetPoint(
Point( nRect.
Left(), nRect.
Top()+n3 ), 2 );
291 checkmark.SetPoint(
Point( nRect.
Left(), nRect.
Top()+n3 + 1 ), 3 );
299 checkmark.SetPoint(
Point( nRect.
Right(), nRect.
Top()+n3 ), 2 );
300 checkmark.SetPoint(
Point( nRect.
Right(), nRect.
Top()+n3 + 1 ), 3 );
351 nRect.
Right(), aCenter.
Y()+n16 ) );
353 aCenter.
X()+n16, nRect.
Bottom() ) );
362 const Color *
const pColor,
const bool bRound =
false )
373 if ( (nLineWidth == 1) && (nLineHeight == 1) )
398 Size( nWidth, nLineHeight ) ) );
400 Size( nLineWidth, nHeight ) ) );
411 const Color& rLeftTopColor,
const Color& rRightBottomColor )
435 const Color aBlackColor(COL_BLACK);
440 ImplDrawDPILineRect( pDev, aFillRect, &aBlackColor );
443 ImplDrawDPILineRect( pDev, aFillRect, &aBlackColor );
457 aOrigFillRect.Right(), aFillRect.
Top()-1 ) );
459 aFillRect.
Left()-1, aOrigFillRect.Bottom() ) );
468 aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
470 aOrigFillRect.Right(), aOrigFillRect.Bottom() ) );
485 ImplDrawDPILineRect( pDev, aFillRect, &aDefBtnColor );
496 bool bNoFace =
false;
515 ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 );
530 ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 );
538 ImplDraw2ColorFrame(pDev, aFillRect, aColor1, aColor1);
541 bNoFace = !bDepressed;
573 bFlatBorders =
false;
601 aControlValue, OUString()) )
616 ImplDrawDPILineRect( pDev, rRect,
nullptr, bRound );
624 (bRound && aColor.
IsDark()) ||
626 (aColor == COL_BLACK) &&
633 ImplDrawDPILineRect( pDev, rRect, &aColor, bRound );
690 ImplDraw2ColorFrame( pDev, rRect,
696 ImplDraw2ColorFrame( pDev, rRect,
705 ImplDraw2ColorFrame( pDev, rRect,
708 ImplDraw2ColorFrame( pDev, rRect,
714 ImplDraw2ColorFrame( pDev, rRect,
717 ImplDraw2ColorFrame( pDev, rRect,
726 ImplDraw2ColorFrame( pDev, rRect,
731 ImplDraw2ColorFrame( pDev, rRect,
738 ImplDraw2ColorFrame( pDev, rRect,
743 ImplDraw2ColorFrame( pDev, rRect,
776 Color nColor(rColor);
812 const Color& rLeftTopColor,
813 const Color& rRightBottomColor )
819 ImplDraw2ColorFrame(
mpOutDev, aRect, rLeftTopColor, rRightBottomColor );
863 std::swap( aLightColor, aShadowColor );
865 DrawFrame( rRect, aLightColor, aShadowColor );
907 ImplDrawButton(
mpOutDev, aRect, nStyle );
967 Point aStart( rStart ), aStop( rStop );
1000 const sal_Int32 nNumberOfPoints = 3;
1004 float fDistance = aOutputSize.
Height();
1005 fDistance /= (nNumberOfPoints + 1);
1008 nRadius /= (nNumberOfPoints + 2);
1013 round(fDistance *
i) - nRadius,
1014 nHalfWidth + nRadius,
1015 round(fDistance *
i) + nRadius);
const StyleSettings & GetStyleSettings() const
void DecreaseLuminance(sal_uInt8 cLumDec)
void IncreaseLuminance(sal_uInt8 cLumInc)
sal_uInt16 GetColorError(const Color &rCompareColor) const
tools::Rectangle DrawButton(const tools::Rectangle &rRect, DrawButtonFlags nStyle)
void DrawHandle(const tools::Rectangle &rRectangle)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
void DrawHighlightFrame(const tools::Rectangle &rRect, DrawHighlightFrameStyle nStyle)
VclPtr< OutputDevice > mpOutDev
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
DecorationView(OutputDevice *pOutDev)
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
SAL_DLLPRIVATE sal_Int32 GetDPIX() const
Get the output device's DPI x-axis value.
void EnableMapMode(bool bEnable=true)
void DrawEllipse(const tools::Rectangle &rRect)
SAL_DLLPRIVATE sal_Int32 GetDPIY() const
Get the output device's DPI y-axis value.
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Wallpaper & GetBackground() const
void DrawPolygon(const tools::Polygon &rPoly)
Render the given polygon.
void DrawPixel(const Point &rPt)
bool IsRTLEnabled() const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
virtual Size GetButtonBorderSize()
virtual bool HasMirroredGraphics() const
const Color & GetLineColor() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const Color &rBackgroundColor=COL_AUTO)
Request rendering of a particular control and/or part.
OutDevType GetOutDevType() const
virtual Color GetMonochromeButtonColor()
const AllSettings & GetSettings() const
virtual vcl::Window * GetOwnerWindow() const
Get the vcl::Window that this OutputDevice belongs to, if any.
bool IsMapModeEnabled() const
const Color & GetFillColor() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetMonoColor() const
const Color & GetDarkShadowColor() const
const Color & GetShadowColor() const
StyleSettingsOptions GetOptions() const
Color GetSeparatorColor() const
const Color & GetCheckedColor() const
const Color & GetLightBorderColor() const
bool GetUseFlatMenus() const
const Color & GetLightColor() const
bool GetUseFlatBorders() const
const Color & GetFaceColor() const
const Color & GetMenuBorderColor() const
const Color & GetColor() const
bool IsNativeWidgetEnabled() const
WindowType GetType() const
vcl::Window * GetWindow(GetWindowType nType) const
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion) const
Query the native control's actual drawing region (including adornment)
bool IsNativeControlSupported(ControlType nType, ControlPart nPart) const
Query the platform layer for control support.
::OutputDevice const * GetOutDev() const
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
B3DVector cross(const B3DVector &rVecA, const B3DVector &rVecB)