Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include "view/SlsPageObjectPainter.hxx"
22 :
23 : #include "model/SlsPageDescriptor.hxx"
24 : #include "view/SlideSorterView.hxx"
25 : #include "view/SlsPageObjectLayouter.hxx"
26 : #include "view/SlsLayouter.hxx"
27 : #include "view/SlsTheme.hxx"
28 : #include "SlsFramePainter.hxx"
29 : #include "cache/SlsPageCache.hxx"
30 : #include "controller/SlsProperties.hxx"
31 : #include "Window.hxx"
32 : #include "sdpage.hxx"
33 : #include "sdresid.hxx"
34 : #include <vcl/svapp.hxx>
35 : #include <vcl/vclenum.hxx>
36 : #include <vcl/virdev.hxx>
37 : #include <boost/scoped_ptr.hpp>
38 : #include "CustomAnimationEffect.hxx"
39 :
40 : using namespace ::drawinglayer::primitive2d;
41 :
42 :
43 : namespace sd { namespace slidesorter { namespace view {
44 :
45 : //===== PageObjectPainter =====================================================
46 :
47 65 : PageObjectPainter::PageObjectPainter (
48 : const SlideSorter& rSlideSorter)
49 65 : : mrLayouter(rSlideSorter.GetView().GetLayouter()),
50 : mpPageObjectLayouter(),
51 65 : mpCache(rSlideSorter.GetView().GetPreviewCache()),
52 : mpProperties(rSlideSorter.GetProperties()),
53 : mpTheme(rSlideSorter.GetTheme()),
54 130 : mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rSlideSorter.GetContentWindow())),
55 130 : mpShadowPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_RawShadow))),
56 130 : mpFocusBorderPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_FocusBorder))),
57 : maNormalBackground(),
58 : maSelectionBackground(),
59 : maFocusedSelectionBackground(),
60 : maMouseOverBackground(),
61 : maMouseOverFocusedBackground(),
62 455 : maSize()
63 : {
64 : // Replace the color (not the alpha values) in the focus border with a
65 : // color derived from the current selection color.
66 65 : Color aColor (mpTheme->GetColor(Theme::Color_Selection));
67 : sal_uInt16 nHue, nSat, nBri;
68 65 : aColor.RGBtoHSB(nHue, nSat, nBri);
69 65 : aColor = Color::HSBtoRGB(nHue, 28, 65);
70 65 : mpFocusBorderPainter->AdaptColor(aColor, true);
71 65 : }
72 :
73 :
74 :
75 65 : PageObjectPainter::~PageObjectPainter (void)
76 : {
77 65 : }
78 :
79 :
80 :
81 :
82 334 : void PageObjectPainter::PaintPageObject (
83 : OutputDevice& rDevice,
84 : const model::SharedPageDescriptor& rpDescriptor)
85 : {
86 334 : if (UpdatePageObjectLayouter())
87 : {
88 : // Turn off antialiasing to avoid the bitmaps from being
89 : // shifted by fractions of a pixel and thus show blurry edges.
90 334 : const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing());
91 334 : rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW);
92 :
93 334 : PaintBackground(rDevice, rpDescriptor);
94 334 : PaintPreview(rDevice, rpDescriptor);
95 334 : PaintPageNumber(rDevice, rpDescriptor);
96 334 : PaintTransitionEffect(rDevice, rpDescriptor);
97 334 : PaintCustomAnimationEffect(rDevice, rpDescriptor);
98 334 : rDevice.SetAntialiasing(nSavedAntialiasingMode);
99 : }
100 334 : }
101 :
102 :
103 :
104 :
105 492 : bool PageObjectPainter::UpdatePageObjectLayouter (void)
106 : {
107 : // The page object layouter is quite volatile. It may have been replaced
108 : // since the last call. Update it now.
109 492 : mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
110 492 : if ( ! mpPageObjectLayouter)
111 : {
112 : OSL_ASSERT(mpPageObjectLayouter);
113 0 : return false;
114 : }
115 : else
116 492 : return true;
117 : }
118 :
119 :
120 :
121 :
122 223 : void PageObjectPainter::NotifyResize (const bool bForce)
123 : {
124 223 : mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
125 223 : if (bForce || ! mpPageObjectLayouter)
126 65 : InvalidateBitmaps();
127 158 : else if (UpdatePageObjectLayouter())
128 : {
129 : const Size aSize (mpPageObjectLayouter->GetSize(
130 : PageObjectLayouter::FocusIndicator,
131 158 : PageObjectLayouter::WindowCoordinateSystem));
132 158 : if ( maSize!=aSize)
133 : {
134 70 : maSize = aSize;
135 70 : InvalidateBitmaps();
136 : }
137 : }
138 223 : }
139 :
140 :
141 :
142 :
143 135 : void PageObjectPainter::InvalidateBitmaps (void)
144 : {
145 135 : maNormalBackground.SetEmpty();
146 135 : maSelectionBackground.SetEmpty();
147 135 : maFocusedSelectionBackground.SetEmpty();
148 135 : maFocusedBackground.SetEmpty();
149 135 : maMouseOverBackground.SetEmpty();
150 135 : maMouseOverFocusedBackground.SetEmpty();
151 135 : maMouseOverSelectedAndFocusedBackground.SetEmpty();
152 135 : }
153 :
154 :
155 :
156 :
157 0 : void PageObjectPainter::SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme)
158 : {
159 0 : mpTheme = rpTheme;
160 0 : NotifyResize(true);
161 0 : }
162 :
163 :
164 :
165 :
166 334 : void PageObjectPainter::PaintBackground (
167 : OutputDevice& rDevice,
168 : const model::SharedPageDescriptor& rpDescriptor)
169 : {
170 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
171 : rpDescriptor,
172 : PageObjectLayouter::FocusIndicator,
173 334 : PageObjectLayouter::ModelCoordinateSystem));
174 :
175 334 : const Bitmap& rBackground (GetBackgroundForState(rpDescriptor, rDevice));
176 334 : rDevice.DrawBitmap(aBox.TopLeft(), rBackground);
177 :
178 : // Fill the interior of the preview area with the default background
179 : // color of the page.
180 334 : SdPage* pPage = rpDescriptor->GetPage();
181 334 : if (pPage != NULL)
182 : {
183 334 : rDevice.SetFillColor(pPage->GetPageBackgroundColor(NULL));
184 334 : rDevice.SetLineColor(pPage->GetPageBackgroundColor(NULL));
185 : const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
186 : rpDescriptor,
187 : PageObjectLayouter::Preview,
188 334 : PageObjectLayouter::ModelCoordinateSystem));
189 334 : rDevice.DrawRect(aPreviewBox);
190 : }
191 334 : }
192 :
193 :
194 :
195 :
196 334 : void PageObjectPainter::PaintPreview (
197 : OutputDevice& rDevice,
198 : const model::SharedPageDescriptor& rpDescriptor) const
199 : {
200 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
201 : rpDescriptor,
202 : PageObjectLayouter::Preview,
203 334 : PageObjectLayouter::ModelCoordinateSystem));
204 :
205 334 : if (mpCache != 0)
206 : {
207 334 : const SdrPage* pPage = rpDescriptor->GetPage();
208 334 : mpCache->SetPreciousFlag(pPage, true);
209 :
210 334 : const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
211 334 : if ( ! aPreview.IsEmpty())
212 : {
213 177 : if (aPreview.GetSizePixel() != aBox.GetSize())
214 4 : rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
215 : else
216 173 : rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
217 334 : }
218 : }
219 334 : }
220 :
221 :
222 :
223 :
224 0 : Bitmap PageObjectPainter::CreateMarkedPreview (
225 : const Size& rSize,
226 : const Bitmap& rPreview,
227 : const BitmapEx& rOverlay,
228 : const OutputDevice* pReferenceDevice) const
229 : {
230 0 : ::boost::scoped_ptr<VirtualDevice> pDevice;
231 0 : if (pReferenceDevice != NULL)
232 0 : pDevice.reset(new VirtualDevice(*pReferenceDevice));
233 : else
234 0 : pDevice.reset(new VirtualDevice());
235 0 : pDevice->SetOutputSizePixel(rSize);
236 :
237 0 : pDevice->DrawBitmap(Point(0,0), rSize, rPreview);
238 :
239 : // Paint bitmap tiled over the preview to mark it as excluded.
240 0 : const sal_Int32 nIconWidth (rOverlay.GetSizePixel().Width());
241 0 : const sal_Int32 nIconHeight (rOverlay.GetSizePixel().Height());
242 0 : if (nIconWidth>0 && nIconHeight>0)
243 : {
244 0 : for (sal_Int32 nX=0; nX<rSize.Width(); nX+=nIconWidth)
245 0 : for (sal_Int32 nY=0; nY<rSize.Height(); nY+=nIconHeight)
246 0 : pDevice->DrawBitmapEx(Point(nX,nY), rOverlay);
247 : }
248 0 : return pDevice->GetBitmap(Point(0,0), rSize);
249 : }
250 :
251 :
252 :
253 :
254 334 : Bitmap PageObjectPainter::GetPreviewBitmap (
255 : const model::SharedPageDescriptor& rpDescriptor,
256 : const OutputDevice* pReferenceDevice) const
257 : {
258 334 : const SdrPage* pPage = rpDescriptor->GetPage();
259 334 : const bool bIsExcluded (rpDescriptor->HasState(model::PageDescriptor::ST_Excluded));
260 :
261 334 : if (bIsExcluded)
262 : {
263 0 : Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage,false));
264 : const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
265 : rpDescriptor,
266 : PageObjectLayouter::Preview,
267 0 : PageObjectLayouter::ModelCoordinateSystem));
268 0 : if (aMarkedPreview.IsEmpty() || aMarkedPreview.GetSizePixel()!=aPreviewBox.GetSize())
269 : {
270 0 : aMarkedPreview = CreateMarkedPreview(
271 : aPreviewBox.GetSize(),
272 : mpCache->GetPreviewBitmap(pPage,true),
273 0 : mpTheme->GetIcon(Theme::Icon_HideSlideOverlay),
274 0 : pReferenceDevice);
275 0 : mpCache->SetMarkedPreviewBitmap(pPage, aMarkedPreview);
276 : }
277 0 : return aMarkedPreview;
278 : }
279 : else
280 : {
281 334 : return mpCache->GetPreviewBitmap(pPage,false);
282 : }
283 : }
284 :
285 :
286 :
287 :
288 334 : void PageObjectPainter::PaintPageNumber (
289 : OutputDevice& rDevice,
290 : const model::SharedPageDescriptor& rpDescriptor) const
291 : {
292 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
293 : rpDescriptor,
294 : PageObjectLayouter::PageNumber,
295 334 : PageObjectLayouter::ModelCoordinateSystem));
296 :
297 : // Determine the color of the page number.
298 334 : Color aPageNumberColor (mpTheme->GetColor(Theme::Color_PageNumberDefault));
299 668 : if (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ||
300 334 : rpDescriptor->HasState(model::PageDescriptor::ST_Selected))
301 : {
302 : // Page number is painted on background for hover or selection or
303 : // both. Each of these background colors has a predefined luminance
304 : // which is compatible with the PageNumberHover color.
305 298 : aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHover));
306 : }
307 : else
308 : {
309 36 : const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
310 36 : const sal_Int32 nBackgroundLuminance (aBackgroundColor.GetLuminance());
311 : // When the background color is black then this is interpreted as
312 : // high contrast mode and the font color is set to white.
313 36 : if (nBackgroundLuminance == 0)
314 0 : aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHighContrast));
315 : else
316 : {
317 : // Compare luminance of default page number color and background
318 : // color. When the two are similar then use a darker
319 : // (preferred) or brighter font color.
320 36 : const sal_Int32 nFontLuminance (aPageNumberColor.GetLuminance());
321 36 : if (abs(nBackgroundLuminance - nFontLuminance) < 60)
322 : {
323 0 : if (nBackgroundLuminance > nFontLuminance-30)
324 0 : aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground));
325 : else
326 0 : aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground));
327 : }
328 : }
329 : }
330 :
331 : // Paint the page number.
332 : OSL_ASSERT(rpDescriptor->GetPage()!=NULL);
333 334 : const sal_Int32 nPageNumber ((rpDescriptor->GetPage()->GetPageNum() - 1) / 2 + 1);
334 334 : const OUString sPageNumber(OUString::valueOf(nPageNumber));
335 334 : rDevice.SetFont(*mpPageNumberFont);
336 334 : rDevice.SetTextColor(aPageNumberColor);
337 334 : rDevice.DrawText(aBox, sPageNumber, TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
338 334 : }
339 :
340 :
341 :
342 :
343 334 : void PageObjectPainter::PaintTransitionEffect (
344 : OutputDevice& rDevice,
345 : const model::SharedPageDescriptor& rpDescriptor) const
346 : {
347 334 : const SdPage* pPage = rpDescriptor->GetPage();
348 334 : if (pPage!=NULL && pPage->getTransitionType() > 0)
349 : {
350 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
351 : rpDescriptor,
352 : PageObjectLayouter::TransitionEffectIndicator,
353 0 : PageObjectLayouter::ModelCoordinateSystem));
354 :
355 : rDevice.DrawBitmapEx(
356 : aBox.TopCenter(),
357 0 : mpPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx());
358 : }
359 334 : }
360 :
361 334 : void PageObjectPainter::PaintCustomAnimationEffect (
362 : OutputDevice& rDevice,
363 : const model::SharedPageDescriptor& rpDescriptor) const
364 : {
365 334 : SdPage* pPage = rpDescriptor->GetPage();
366 334 : boost::shared_ptr< MainSequence > aMainSequence = pPage->getMainSequence();
367 334 : EffectSequence::iterator aIter = aMainSequence->getBegin();
368 334 : EffectSequence::iterator aEnd = aMainSequence->getEnd();
369 334 : if ( aIter != aEnd )
370 : {
371 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
372 : rpDescriptor,
373 : PageObjectLayouter::CustomAnimationEffectIndicator,
374 0 : PageObjectLayouter::ModelCoordinateSystem));
375 : rDevice.DrawBitmapEx(
376 : aBox.TopCenter(),
377 0 : mpPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmapEx());
378 334 : }
379 334 : }
380 :
381 334 : Bitmap& PageObjectPainter::GetBackgroundForState (
382 : const model::SharedPageDescriptor& rpDescriptor,
383 : const OutputDevice& rReferenceDevice)
384 : {
385 : enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
386 : const int eState =
387 334 : (rpDescriptor->HasState(model::PageDescriptor::ST_Selected) ? Selected : None)
388 334 : | (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
389 334 : | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None);
390 :
391 334 : switch (eState)
392 : {
393 : case MouseOver | Selected | Focused:
394 : return GetBackground(
395 : maMouseOverSelectedAndFocusedBackground,
396 : Theme::Gradient_MouseOverSelectedAndFocusedPage,
397 : rReferenceDevice,
398 0 : true);
399 :
400 : case MouseOver | Selected:
401 : case MouseOver:
402 : return GetBackground(
403 : maMouseOverBackground,
404 : Theme::Gradient_MouseOverPage,
405 : rReferenceDevice,
406 0 : false);
407 :
408 : case MouseOver | Focused:
409 : return GetBackground(
410 : maMouseOverFocusedBackground,
411 : Theme::Gradient_MouseOverPage,
412 : rReferenceDevice,
413 0 : true);
414 :
415 : case Selected | Focused:
416 : return GetBackground(
417 : maFocusedSelectionBackground,
418 : Theme::Gradient_SelectedAndFocusedPage,
419 : rReferenceDevice,
420 0 : true);
421 :
422 : case Selected:
423 : return GetBackground(
424 : maSelectionBackground,
425 : Theme::Gradient_SelectedPage,
426 : rReferenceDevice,
427 298 : false);
428 :
429 : case Focused:
430 : return GetBackground(
431 : maFocusedBackground,
432 : Theme::Gradient_FocusedPage,
433 : rReferenceDevice,
434 0 : true);
435 :
436 : case None:
437 : default:
438 : return GetBackground(
439 : maNormalBackground,
440 : Theme::Gradient_NormalPage,
441 : rReferenceDevice,
442 36 : false);
443 : }
444 : }
445 :
446 :
447 :
448 :
449 334 : Bitmap& PageObjectPainter::GetBackground(
450 : Bitmap& rBackground,
451 : Theme::GradientColorType eType,
452 : const OutputDevice& rReferenceDevice,
453 : const bool bHasFocusBorder)
454 : {
455 334 : if (rBackground.IsEmpty())
456 77 : rBackground = CreateBackgroundBitmap(rReferenceDevice, eType, bHasFocusBorder);
457 334 : return rBackground;
458 : }
459 :
460 :
461 :
462 :
463 77 : Bitmap PageObjectPainter::CreateBackgroundBitmap(
464 : const OutputDevice& rReferenceDevice,
465 : const Theme::GradientColorType eColorType,
466 : const bool bHasFocusBorder) const
467 : {
468 : const Size aSize (mpPageObjectLayouter->GetSize(
469 : PageObjectLayouter::FocusIndicator,
470 77 : PageObjectLayouter::WindowCoordinateSystem));
471 : const Rectangle aPageObjectBox (mpPageObjectLayouter->GetBoundingBox(
472 : Point(0,0),
473 : PageObjectLayouter::PageObject,
474 77 : PageObjectLayouter::ModelCoordinateSystem));
475 77 : VirtualDevice aBitmapDevice (rReferenceDevice);
476 77 : aBitmapDevice.SetOutputSizePixel(aSize);
477 :
478 : // Fill the background with the background color of the slide sorter.
479 77 : const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
480 77 : aBitmapDevice.SetFillColor(aBackgroundColor);
481 77 : aBitmapDevice.SetLineColor(aBackgroundColor);
482 77 : aBitmapDevice.DrawRect(Rectangle(Point(0,0), aSize));
483 :
484 : // Paint the slide area with a linear gradient that starts some pixels
485 : // below the top and ends some pixels above the bottom.
486 77 : const Color aTopColor(mpTheme->GetGradientColor(eColorType, Theme::Fill1));
487 77 : const Color aBottomColor(mpTheme->GetGradientColor(eColorType, Theme::Fill2));
488 77 : if (aTopColor != aBottomColor)
489 : {
490 0 : const sal_Int32 nHeight (aPageObjectBox.GetHeight());
491 0 : const sal_Int32 nDefaultConstantSize(nHeight/4);
492 0 : const sal_Int32 nMinimalGradientSize(40);
493 : const sal_Int32 nY1 (
494 : ::std::max<sal_Int32>(
495 : 0,
496 : ::std::min<sal_Int32>(
497 : nDefaultConstantSize,
498 0 : (nHeight - nMinimalGradientSize)/2)));
499 0 : const sal_Int32 nY2 (nHeight-nY1);
500 0 : const sal_Int32 nTop (aPageObjectBox.Top());
501 0 : for (sal_Int32 nY=0; nY<nHeight; ++nY)
502 : {
503 0 : if (nY<=nY1)
504 0 : aBitmapDevice.SetLineColor(aTopColor);
505 0 : else if (nY>=nY2)
506 0 : aBitmapDevice.SetLineColor(aBottomColor);
507 : else
508 : {
509 0 : Color aColor (aTopColor);
510 0 : aColor.Merge(aBottomColor, 255 * (nY2-nY) / (nY2-nY1));
511 0 : aBitmapDevice.SetLineColor(aColor);
512 : }
513 : aBitmapDevice.DrawLine(
514 : Point(aPageObjectBox.Left(), nY+nTop),
515 0 : Point(aPageObjectBox.Right(), nY+nTop));
516 : }
517 : }
518 : else
519 : {
520 77 : aBitmapDevice.SetFillColor(aTopColor);
521 77 : aBitmapDevice.DrawRect(aPageObjectBox);
522 : }
523 :
524 : // Paint the simple border and, for some backgrounds, the focus border.
525 77 : if (bHasFocusBorder)
526 0 : mpFocusBorderPainter->PaintFrame(aBitmapDevice, aPageObjectBox);
527 : else
528 77 : PaintBorder(aBitmapDevice, eColorType, aPageObjectBox);
529 :
530 : // Get bounding box of the preview around which a shadow is painted.
531 : // Compensate for the border around the preview.
532 : const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
533 : Point(0,0),
534 : PageObjectLayouter::Preview,
535 77 : PageObjectLayouter::ModelCoordinateSystem));
536 77 : Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1);
537 77 : mpShadowPainter->PaintFrame(aBitmapDevice, aFrameBox);
538 :
539 77 : return aBitmapDevice.GetBitmap (Point(0,0),aSize);
540 : }
541 :
542 :
543 :
544 :
545 77 : void PageObjectPainter::PaintBorder (
546 : OutputDevice& rDevice,
547 : const Theme::GradientColorType eColorType,
548 : const Rectangle& rBox) const
549 : {
550 77 : rDevice.SetFillColor();
551 77 : const sal_Int32 nBorderWidth (1);
552 154 : for (int nIndex=0; nIndex<nBorderWidth; ++nIndex)
553 : {
554 77 : const int nDelta (nIndex);
555 77 : rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border2));
556 : rDevice.DrawLine(
557 154 : Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
558 231 : Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta));
559 : rDevice.DrawLine(
560 154 : Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta),
561 231 : Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta));
562 : rDevice.DrawLine(
563 154 : Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta),
564 231 : Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
565 :
566 77 : rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border1));
567 : rDevice.DrawLine(
568 154 : Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
569 231 : Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
570 : }
571 77 : }
572 :
573 :
574 :
575 33 : } } } // end of namespace sd::slidesorter::view
576 :
577 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|