DrawHelper.cxx (b9e67834) DrawHelper.cxx (95a18594)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 59 unchanged lines hidden (view full) ---

68 rBox.Right()-aBorderSize.Right()+1,
69 aBorderSize.Right(),
70 rVerticalPaint);
71}
72
73
74
75
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 59 unchanged lines hidden (view full) ---

68 rBox.Right()-aBorderSize.Right()+1,
69 aBorderSize.Right(),
70 rVerticalPaint);
71}
72
73
74
75
76void DrawHelper::DrawBevelBorder (
77 OutputDevice& rDevice,
78 const Rectangle rBox,
79 const SvBorder aBorderSize,
80 const Paint& rTopLeftPaint,
81 const Paint& rCenterPaint,
82 const Paint& rBottomRightPaint)
83{
84 // Draw top line.
85 DrawHorizontalLine(
86 rDevice,
87 rBox.Left(),
88 rBox.Right() - aBorderSize.Right(),
89 rBox.Top(),
90 aBorderSize.Top(),
91 rTopLeftPaint);
92 // Draw bottom line.
93 DrawHorizontalLine(
94 rDevice,
95 rBox.Left()+aBorderSize.Left(),
96 rBox.Right(),
97 rBox.Bottom()-aBorderSize.Bottom()+1,
98 aBorderSize.Bottom(),
99 rBottomRightPaint);
100 // Draw left line.
101 DrawVerticalLine(
102 rDevice,
103 rBox.Top()+aBorderSize.Top(),
104 rBox.Bottom() - aBorderSize.Bottom(),
105 rBox.Left(),
106 aBorderSize.Left(),
107 rTopLeftPaint);
108 // Draw right line.
109 DrawVerticalLine(
110 rDevice,
111 rBox.Top()+aBorderSize.Top(),
112 rBox.Bottom()-aBorderSize.Bottom(),
113 rBox.Right()-aBorderSize.Right()+1,
114 aBorderSize.Right(),
115 rBottomRightPaint);
116 // Draw top right corner.
117 DrawVerticalLine(
118 rDevice,
119 rBox.Top(),
120 rBox.Top()+aBorderSize.Top()-1,
121 rBox.Right()-aBorderSize.Right()+1,
122 aBorderSize.Right(),
123 rCenterPaint);
124 // Draw bottom right corner.
125 DrawVerticalLine(
126 rDevice,
127 rBox.Bottom() - aBorderSize.Bottom()+1,
128 rBox.Bottom(),
129 rBox.Left(),
130 aBorderSize.Left(),
131 rCenterPaint);
132}
133
134
135
136
76void DrawHelper::DrawHorizontalLine(
77 OutputDevice& rDevice,
78 const sal_Int32 nLeft,
79 const sal_Int32 nRight,
80 const sal_Int32 nY,
81 const sal_Int32 nHeight,
82 const Paint& rPaint)
83{

--- 95 unchanged lines hidden (view full) ---

179 rDevice.SetFillColor();
180 rDevice.DrawRect(rBox, nCornerRadius, nCornerRadius);
181 break;
182 }
183}
184
185
186
137void DrawHelper::DrawHorizontalLine(
138 OutputDevice& rDevice,
139 const sal_Int32 nLeft,
140 const sal_Int32 nRight,
141 const sal_Int32 nY,
142 const sal_Int32 nHeight,
143 const Paint& rPaint)
144{

--- 95 unchanged lines hidden (view full) ---

240 rDevice.SetFillColor();
241 rDevice.DrawRect(rBox, nCornerRadius, nCornerRadius);
242 break;
243 }
244}
245
246
247
248
187} } // end of namespace sfx2::sidebar
249} } // end of namespace sfx2::sidebar