1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_FRAMELINK_HXX
21 #define INCLUDED_SVX_FRAMELINK_HXX
24 #include <sal/types.h>
25 #include <tools/color.hxx>
26 #include <svx/svxdllapi.h>
27 #include <vcl/outdev.hxx>
28 #include <editeng/borderline.hxx>
30 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
43 /** Specifies how the reference points for frame borders are used.
47 /** Frame borders are drawn centered to the reference points. */
50 /** The reference points specify the begin of the frame border width.
52 The result is that horizontal lines are drawn below, and vertical lines
53 are drawn right of the reference points.
57 /** The reference points specify the end of the frame border width.
59 The result is that horizontal lines are drawn above, and vertical lines
60 are drawn left of the reference points.
69 /** Contains the widths of primary and secondary line of a frame style.
71 In the following, "frame style" is a complete style of one frame border,
72 i.e. the double line at the left side of the frame. A "line" is always a
73 trivial single line, i.e. the first line of a double frame style.
75 The following states of the members of this struct are valid:
77 mnPrim mnDist mnSecn frame style
78 -------------------------------------------------
83 The behaviour of the member functions for other states is not defined.
85 Per definition the primary line in double frame styles is:
86 - The top line for horizontal frame borders.
87 - The left line for vertical frame borders.
88 - The bottom-left line for top-left to bottom-right diagonal frame borders.
89 - The top-left line for bottom-left to top-right diagonal frame borders.
91 The following picture shows the upper end of a vertical double frame
94 |<---------------- GetWidth() ----------------->|
96 |<----- mnPrim ----->||<- mnDist ->||<- mnSecn >|
98 ###################### #############
99 ###################### #############
100 ###################### #############
101 ###################### #############
102 ###################### | #############
103 ###################### | #############
105 |<- middle of the frame border
107 class SVX_DLLPUBLIC SAL_WARN_UNUSED Style
110 /** Constructs an invisible frame style. */
112 /** Constructs a frame style with passed line widths. */
113 explicit Style( double nP
, double nD
, double nS
, editeng::SvxBorderStyle nType
);
114 /** Constructs a frame style with passed color and line widths. */
115 explicit Style( const Color
& rColorPrim
, const Color
& rColorSecn
, const Color
& rColorGap
, bool bUseGapColor
,
116 double nP
, double nD
, double nS
, editeng::SvxBorderStyle nType
);
117 /** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
118 explicit Style( const editeng::SvxBorderLine
* pBorder
, double fScale
= 1.0, sal_uInt16 nMaxWidth
= SAL_MAX_UINT16
);
120 inline RefMode
GetRefMode() const { return meRefMode
; }
121 inline const Color
& GetColorPrim() const { return maColorPrim
; }
122 inline const Color
& GetColorSecn() const { return maColorSecn
; }
123 inline const Color
& GetColorGap() const { return maColorGap
; }
124 inline bool UseGapColor() const { return mbUseGapColor
; }
125 inline double Prim() const { return mfPrim
; }
126 inline double Dist() const { return mfDist
; }
127 inline double Secn() const { return mfSecn
; }
128 double PatternScale() const { return mfPatternScale
;}
129 void SetPatternScale( double fScale
);
130 inline editeng::SvxBorderStyle
Type() const { return mnType
; }
132 /** Returns the total width of this frame style. */
133 inline double GetWidth() const { return mfPrim
+ mfDist
+ mfSecn
; }
135 /** Sets the frame style to invisible state. */
137 /** Sets the frame style to the passed line widths. */
138 void Set( double nP
, double nD
, double nS
);
139 /** Sets the frame style to the passed line widths. */
140 void Set( const Color
& rColorPrim
, const Color
& rColorSecn
, const Color
& rColorGap
, bool bUseGapColor
,
141 double nP
, double nD
, double nS
);
142 /** Sets the frame style to the passed SvxBorderLine struct. */
143 void Set( const editeng::SvxBorderLine
& rBorder
, double fScale
= 1.0, sal_uInt16 nMaxWidth
= SAL_MAX_UINT16
);
144 /** Sets the frame style to the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
145 void Set( const editeng::SvxBorderLine
* pBorder
, double fScale
= 1.0, sal_uInt16 nMaxWidth
= SAL_MAX_UINT16
);
147 /** Sets a new reference point handling mode, does not modify other settings. */
148 inline void SetRefMode( RefMode eRefMode
) { meRefMode
= eRefMode
; }
149 /** Sets a new color, does not modify other settings. */
150 inline void SetColorPrim( const Color
& rColor
) { maColorPrim
= rColor
; }
151 inline void SetColorSecn( const Color
& rColor
) { maColorSecn
= rColor
; }
152 inline void SetColorGap( bool bUseIt
, const Color
& rColor
) { maColorGap
= rColor
; mbUseGapColor
= bUseIt
; }
153 /** Sets whether to use dotted style for single hair lines. */
154 inline void SetType( editeng::SvxBorderStyle nType
) { mnType
= nType
; }
156 /** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */
158 /** Returns this style mirrored, if it is a double frame style, otherwise a simple copy. */
159 Style
Mirror() const;
166 RefMode meRefMode
; /// Reference point handling for this frame border.
167 double mfPrim
; /// Width of primary (single, left, or top) line.
168 double mfDist
; /// Distance between primary and secondary line.
169 double mfSecn
; /// Width of secondary (right or bottom) line.
170 double mfPatternScale
; /// Scale used for line pattern spacing.
171 editeng::SvxBorderStyle mnType
;
174 bool operator==( const Style
& rL
, const Style
& rR
);
175 SVX_DLLPUBLIC
bool operator<( const Style
& rL
, const Style
& rR
);
177 inline bool operator!=( const Style
& rL
, const Style
& rR
) { return !(rL
== rR
); }
178 inline bool operator>( const Style
& rL
, const Style
& rR
) { return rR
< rL
; }
179 inline bool operator<=( const Style
& rL
, const Style
& rR
) { return !(rR
< rL
); }
180 inline bool operator>=( const Style
& rL
, const Style
& rR
) { return !(rL
< rR
); }
184 /** Extends the Style struct with an angle for diagonal frame borders.
186 The angle is specified in radian (a full circle is equivalent to 2*PI).
187 It is dependent on the context, how the value is interpreted, i.e. it may
188 specify the angle to a horizontal or vertical frame border.
190 class SAL_WARN_UNUSED DiagStyle
: public Style
193 /** Constructs an invisible diagonal frame style. */
194 inline explicit DiagStyle() : mfAngle( 0.0 ) {}
195 /** Constructs a diagonal frame style passed style and angle. */
196 inline explicit DiagStyle( const Style
& rStyle
, double fAngle
) :
197 Style( rStyle
), mfAngle( fAngle
) {}
199 inline double GetAngle() const { return mfAngle
; }
201 /** Returns this style mirrored, if it is a double frame style, otherwise a simple copy. */
202 inline DiagStyle
Mirror() const { return DiagStyle( Style::Mirror(), mfAngle
); }
205 double mfAngle
; /// Angle between this and hor. or vert. border.
209 // Various helper functions
212 /** Returns the angle between horizontal border of a rectangle and its diagonal.
214 The returned values represents the inner angle between the diagonals and
215 horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The
216 passed sizes may be negative, calculation is done with absolute values.
218 SVX_DLLPUBLIC
double GetHorDiagAngle( long nWidth
, long nHeight
);
220 /** Returns the angle between horizontal border of a rectangle and its diagonal.
222 The returned values represents the inner angle between the diagonals and
223 horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The
224 passed rectangle positions may be unordered, they are adjusted internally.
226 inline double GetHorDiagAngle( long nX1
, long nX2
, long nY1
, long nY2
)
227 { return GetHorDiagAngle( nX2
- nX1
, nY2
- nY1
); }
229 /** Returns the angle between horizontal border of a rectangle and its diagonal.
231 The returned values represents the inner angle between the diagonals and
232 horizontal borders, and is therefore in the range [0,PI/2] (inclusive). The
233 passed rectangle edges may be unordered, they are adjusted internally.
235 inline double GetHorDiagAngle( const Point
& rP1
, const Point
& rP2
)
236 { return GetHorDiagAngle( rP2
.X() - rP1
.X(), rP2
.Y() - rP1
.Y() ); }
238 /** Returns the angle between horizontal border of a rectangle and its diagonal.
240 The returned values represents the inner angle between the diagonals and
241 horizontal borders, and is therefore in the range [0,PI/2] (inclusive).
243 inline double GetHorDiagAngle( const Rectangle
& rRect
)
244 { return GetHorDiagAngle( rRect
.GetWidth(), rRect
.GetHeight() ); }
248 /** Returns the angle between vertical border of a rectangle and its diagonal.
250 The returned values represents the inner angle between the diagonals and
251 vertical borders, and is therefore in the range [0,PI/2] (inclusive). The
252 passed sizes may be negative, calculation is done with absolute values.
254 inline double GetVerDiagAngle( long nWidth
, long nHeight
)
255 { return GetHorDiagAngle( nHeight
, nWidth
); }
257 /** Returns the angle between vertical border of a rectangle and its diagonal.
259 The returned values represents the inner angle between the diagonals and
260 vertical borders, and is therefore in the range [0,PI/2] (inclusive). The
261 passed rectangle positions may be unordered, they are adjusted internally.
263 inline double GetVerDiagAngle( long nX1
, long nX2
, long nY1
, long nY2
)
264 { return GetVerDiagAngle( nX2
- nX1
, nY2
- nY1
); }
266 /** Returns the angle between vertical border of a rectangle and its diagonal.
268 The returned values represents the inner angle between the diagonals and
269 vertical borders, and is therefore in the range [0,PI/2] (inclusive). The
270 passed rectangle edges may be unordered, they are adjusted internally.
272 inline double GetVerDiagAngle( const Point
& rP1
, const Point
& rP2
)
273 { return GetVerDiagAngle( rP2
.X() - rP1
.X(), rP2
.Y() - rP1
.Y() ); }
275 /** Returns the angle between vertical border of a rectangle and its diagonal.
277 The returned values represents the inner angle between the diagonals and
278 vertical borders, and is therefore in the range [0,PI/2] (inclusive).
280 inline double GetVerDiagAngle( const Rectangle
& rRect
)
281 { return GetVerDiagAngle( rRect
.GetWidth(), rRect
.GetHeight() ); }
285 /** Returns an X coordinate for a diagonal frame border in the specified height.
287 This function is for usage with the top-left end of a top-left to
288 bottom-right diagonal frame border, connected to the left end of a
289 horizontal frame border.
291 The function returns the relative X position (i.e. for a polygon) of the
292 diagonal frame border according to the specified relative Y position. The
293 mentioned positions are relative to the reference point of both frame
296 +----------------------------------------------------------
297 | The horizontal frame border.
299 - - - - - - | --+-- <---- Reference point for horizontal and diagonal frame borders.
301 nVerOffs | \ \ <--- The diagonal frame border.
302 v +---\ \------------------------------------------------
303 - - - - - - - - -\- - -X <----- The function calculates the X position of i.e.
304 \ \ this point (relative from X of reference point).
306 Primary -->\ \<-- Secondary
309 The vertical position of the point to be calculated, relative to the Y
310 coordinate of the reference point.
312 The width offset across the diagonal frame border (0 = middle),
313 regardless of the gradient of the diagonal frame border (always
314 vertical to the direction of the diagonal frame border). This value is
315 not related in any way to the reference point. For details about
316 relative width offsets, see description of class Style.
318 Inner (right) angle between diagonal and horizontal frame border.
320 SVX_DLLPUBLIC
long GetTLDiagOffset( long nVerOffs
, long nDiagOffs
, double fAngle
);
322 /** Returns an X coordinate for a diagonal frame border in the specified height.
324 This function is for usage with the bottom-left end of a bottom-left to
325 top-right diagonal frame border, connected to the left end of a horizontal
328 The function returns the relative X position (i.e. for a polygon) of the
329 diagonal frame border according to the specified relative Y position. The
330 mentioned positions are relative to the reference point of both frame
333 Primary -->/ /<--- Secondary
335 / / The function calculates the X position of i.e.
336 - - - - - - - - -/- - -X <----- this point (relative from X of reference point).
337 ^ +---/ /------------------------------------------------
338 nVerOffs | / / <--- The diagonal frame border.
340 - - - - - - | --+-- <---- Reference point for horizontal and diagonal frame borders.
342 | The horizontal frame border.
343 +----------------------------------------------------------
346 The vertical position of the point to be calculated, relative to the Y
347 coordinate of the reference point.
349 The width offset across the diagonal frame border (0 = middle),
350 regardless of the gradient of the diagonal frame border (always
351 vertical to the direction of the diagonal frame border). This value is
352 not related in any way to the reference point. For details about
353 relative width offsets, see description of class Style.
355 Inner (right) angle between diagonal and horizontal frame border.
357 long GetBLDiagOffset( long nVerOffs
, long nDiagOffs
, double fAngle
);
359 /** Returns an X coordinate for a diagonal frame border in the specified height.
361 This function is for usage with the bottom-right end of a top-left to
362 bottom-right diagonal frame border, connected to the right end of a
363 horizontal frame border.
366 The vertical position of the point to be calculated, relative to the Y
367 coordinate of the reference point.
369 The width offset across the diagonal frame border (0 = middle),
370 regardless of the gradient of the diagonal frame border (always
371 vertical to the direction of the diagonal frame border). This value is
372 not related in any way to the reference point. For details about
373 relative width offsets, see description of class Style.
375 Inner (left) angle between diagonal and horizontal frame border.
377 long GetBRDiagOffset( long nVerOffs
, long nDiagOffs
, double fAngle
);
379 /** Returns an X coordinate for a diagonal frame border in the specified height.
381 This function is for usage with the top-right end of a bottom-left to
382 top-right diagonal frame border, connected to the right end of a horizontal
386 The vertical position of the point to be calculated, relative to the Y
387 coordinate of the reference point.
389 The width offset across the diagonal frame border (0 = middle),
390 regardless of the gradient of the diagonal frame border (always
391 vertical to the direction of the diagonal frame border). This value is
392 not related in any way to the reference point. For details about
393 relative width offsets, see description of class Style.
395 Inner (left) angle between diagonal and horizontal frame border.
397 long GetTRDiagOffset( long nVerOffs
, long nDiagOffs
, double fAngle
);
401 /** Checks whether two horizontal frame borders are "connectable".
403 Two borders are "connectable" in terms of this function, if both can be
404 drawn with only one call of a border drawing function. This means, the two
405 frame borders must have equal style and color, and none of the other
406 vertical and diagonal frame borders break the lines of the two borders in
407 any way (i.e. two vertical double frame borders would break the horizonal
408 frame borders). Of course this function can be used for vertical frame
411 The follong picture shows the meaning of all passed parameters:
418 ======== rLBorder ========= ========== rRBorder =======
426 True, if rLBorder and rRBorder can be drawn in one step without
427 interruption at their connection point.
429 SVX_DLLPUBLIC
bool CheckFrameBorderConnectable(
430 const Style
& rLBorder
, /// Style of the left frame border to connect.
431 const Style
& rRBorder
, /// Style of the right frame border to connect.
433 const Style
& rTFromTL
, /// Diagonal frame border from top-left to connection point.
434 const Style
& rTFromT
, /// Vertical frame border from top to connection point.
435 const Style
& rTFromTR
, /// Horizontal frame border from top-right to connection point.
437 const Style
& rBFromBL
, /// Diagonal frame border from bottom-left to connection point.
438 const Style
& rBFromB
, /// Vertical frame border from bottom to connection point.
439 const Style
& rBFromBR
/// Horizontal frame border from bottom-right to connection point.
446 /** Draws a horizontal frame border, regards all connected frame styles.
448 The frame style to draw is passed as parameter rBorder. The function
449 calculates the adjustment in X direction for left and right end of primary
450 and secondary line of the frame border (the style may present a double
451 line). The line ends may differ according to the connected frame styles
452 coming from top, bottom, left, right, and/or diagonal.
454 Thick frame styles are always drawn centered (in width) to the passed
455 reference points. The Y coordinates of both reference points must be equal
456 (the line cannot be drawn slanted).
458 The function preserves all settings of the passed output device.
460 All parameters starting with "rL" refer to the left end of the processed
461 frame border, all parameters starting with "rR" refer to the right end.
462 The following part of the parameter name starting with "From" specifies
463 where the frame border comes from. Example: "rLFromTR" means the frame
464 border coming from top-right, connected to the left end of rBorder (and
465 therefore a diagonal frame border).
467 The follong picture shows the meaning of all passed parameters:
471 | rLFromTR rRFromTL |
474 --- rLFromL --- ============== rBorder ============== --- rRFromR ---
477 | rLFromBR rRFromBL |
481 SVX_DLLPUBLIC
drawinglayer::primitive2d::Primitive2DSequence
CreateBorderPrimitives(
482 const Point
& rLPos
, /// Reference point for left end of the processed frame border.
483 const Point
& rRPos
, /// Reference point for right end of the processed frame border.
484 const Style
& rBorder
, /// Style of the processed frame border.
486 const DiagStyle
& rLFromTR
, /// Diagonal frame border from top-right to left end of rBorder.
487 const Style
& rLFromT
, /// Vertical frame border from top to left end of rBorder.
488 const Style
& rLFromL
, /// Horizontal frame border from left to left end of rBorder.
489 const Style
& rLFromB
, /// Vertical frame border from bottom to left end of rBorder.
490 const DiagStyle
& rLFromBR
, /// Diagonal frame border from bottom-right to left end of rBorder.
492 const DiagStyle
& rRFromTL
, /// Diagonal frame border from top-left to right end of rBorder.
493 const Style
& rRFromT
, /// Vertical frame border from top to right end of rBorder.
494 const Style
& rRFromR
, /// Horizontal frame border from right to right end of rBorder.
495 const Style
& rRFromB
, /// Vertical frame border from bottom to right end of rBorder.
496 const DiagStyle
& rRFromBL
, /// Diagonal frame border from bottom-left to right end of rBorder.
498 const Color
* pForceColor
= 0,/// If specified, overrides frame border color.
499 const long& rRotationT
= 9000, /// Angle of the top slanted frames in 100th of degree
500 const long& rRotationB
= 9000 /// Angle of the bottom slanted frames in 100th of degree
503 SVX_DLLPUBLIC
drawinglayer::primitive2d::Primitive2DSequence
CreateBorderPrimitives(
504 const Point
& rLPos
, /// Reference point for left end of the processed frame border.
505 const Point
& rRPos
, /// Reference point for right end of the processed frame border.
506 const Style
& rBorder
, /// Style of the processed frame border.
508 const Style
& rLFromT
, /// Vertical frame border from top to left end of rBorder.
509 const Style
& rLFromL
, /// Horizontal frame border from left to left end of rBorder.
510 const Style
& rLFromB
, /// Vertical frame border from bottom to left end of rBorder.
512 const Style
& rRFromT
, /// Vertical frame border from top to right end of rBorder.
513 const Style
& rRFromR
, /// Horizontal frame border from right to right end of rBorder.
514 const Style
& rRFromB
, /// Vertical frame border from bottom to right end of rBorder.
516 const Color
* pForceColor
= 0,/// If specified, overrides frame border color.
517 const long& rRotationT
= 9000, /// Angle of the top slanted frame in 100th of degrees
518 const long& rRotationB
= 9000 /// Angle of the bottom slanted frame in 100th of degrees
521 SVX_DLLPUBLIC
drawinglayer::primitive2d::Primitive2DSequence
CreateClippedBorderPrimitives (
522 const Point
& rStart
, const Point
& rEnd
, const Style
& rBorder
,
523 const Rectangle
& rClipRect
);
525 /** Draws a horizontal frame border, regards all connected frame styles.
527 The frame style to draw is passed as parameter rBorder. The function
528 calculates the adjustment in X direction for left and right end of primary
529 and secondary line of the frame border (the style may present a double
530 line). The line ends may differ according to the connected frame styles
531 coming from top, bottom, left, right, and/or diagonal.
533 Thick frame styles are always drawn centered (in width) to the passed
534 reference points. The Y coordinates of both reference points must be equal
535 (the line cannot be drawn slanted).
537 The function preserves all settings of the passed output device.
539 All parameters starting with "rL" refer to the left end of the processed
540 frame border, all parameters starting with "rR" refer to the right end.
541 The following part of the parameter name starting with "From" specifies
542 where the frame border comes from. Example: "rLFromTR" means the frame
543 border coming from top-right, connected to the left end of rBorder (and
544 therefore a diagonal frame border).
546 The follong picture shows the meaning of all passed parameters:
550 | rLFromTR rRFromTL |
553 --- rLFromL --- ============== rBorder ============== --- rRFromR ---
556 | rLFromBR rRFromBL |
560 SVX_DLLPUBLIC
void DrawHorFrameBorder(
561 OutputDevice
& rDev
, /// The output device used to draw the frame border.
563 const Point
& rLPos
, /// Reference point for left end of the processed frame border.
564 const Point
& rRPos
, /// Reference point for right end of the processed frame border.
565 const Style
& rBorder
, /// Style of the processed frame border.
567 const DiagStyle
& rLFromTR
, /// Diagonal frame border from top-right to left end of rBorder.
568 const Style
& rLFromT
, /// Vertical frame border from top to left end of rBorder.
569 const Style
& rLFromL
, /// Horizontal frame border from left to left end of rBorder.
570 const Style
& rLFromB
, /// Vertical frame border from bottom to left end of rBorder.
571 const DiagStyle
& rLFromBR
, /// Diagonal frame border from bottom-right to left end of rBorder.
573 const DiagStyle
& rRFromTL
, /// Diagonal frame border from top-left to right end of rBorder.
574 const Style
& rRFromT
, /// Vertical frame border from top to right end of rBorder.
575 const Style
& rRFromR
, /// Horizontal frame border from right to right end of rBorder.
576 const Style
& rRFromB
, /// Vertical frame border from bottom to right end of rBorder.
577 const DiagStyle
& rRFromBL
, /// Diagonal frame border from bottom-left to right end of rBorder.
579 const Color
* pForceColor
= 0 /// If specified, overrides frame border color.
584 /** Draws a vertical frame border, regards all connected frame styles.
586 The frame style to draw is passed as parameter rBorder. The function
587 calculates the adjustment in Y direction for top and bottom end of primary
588 and secondary line of the frame border (the style may present a double
589 line). The line ends may differ according to the connected frame styles
590 coming from left, right, top, bottom, and/or diagonal.
592 Thick frame styles are always drawn centered (in width) to the passed
593 reference points. The X coordinates of both reference points must be equal
594 (the line cannot be drawn slanted).
596 The function preserves all settings of the passed output device.
598 All parameters starting with "rT" refer to the top end of the processed
599 frame border, all parameters starting with "rB" refer to the bottom end.
600 The following part of the parameter name starting with "From" specifies
601 where the frame border comes from. Example: "rTFromBL" means the frame
602 border coming from bottom-left, connected to the top end of rBorder (and
603 therefore a diagonal frame border).
605 The follong picture shows the meaning of all passed parameters:
611 --- rTFromL --- --- rTFromR ---
625 --- rBFromL --- --- rBFromR ---
631 SVX_DLLPUBLIC
void DrawVerFrameBorder(
632 OutputDevice
& rDev
, /// The output device used to draw the frame border.
634 const Point
& rTPos
, /// Reference point for top end of the processed frame border.
635 const Point
& rBPos
, /// Reference point for bottom end of the processed frame border.
636 const Style
& rBorder
, /// Style of the processed frame border.
638 const DiagStyle
& rTFromBL
, /// Diagonal frame border from bottom-right to top end of rBorder.
639 const Style
& rTFromL
, /// Horizontal frame border from left to top end of rBorder.
640 const Style
& rTFromT
, /// Vertical frame border from top to top end of rBorder.
641 const Style
& rTFromR
, /// Horizontal frame border from right to top end of rBorder.
642 const DiagStyle
& rTFromBR
, /// Diagonal frame border from bottom-right to top end of rBorder.
644 const DiagStyle
& rBFromTL
, /// Diagonal frame border from top-left to bottom end of rBorder.
645 const Style
& rBFromL
, /// Horizontal frame border from left to bottom end of rBorder.
646 const Style
& rBFromB
, /// Vertical frame border from bottom to bottom end of rBorder.
647 const Style
& rBFromR
, /// Horizontal frame border from right to bottom end of rBorder.
648 const DiagStyle
& rBFromTR
, /// Diagonal frame border from top-right to bottom end of rBorder.
650 const Color
* pForceColor
= 0 /// If specified, overrides frame border color.
655 /** Draws both diagonal frame borders, regards all connected frame styles.
657 One or both passed diagonal frame styles may be invisible.
659 The function preserves all settings of the passed output device.
661 SVX_DLLPUBLIC
void DrawDiagFrameBorders(
662 OutputDevice
& rDev
, /// The output device used to draw the frame border.
664 const Rectangle
& rRect
, /// Rectangle for both diagonal frame borders.
665 const Style
& rTLBR
, /// Style of the processed top-left to bottom-right diagonal frame border.
666 const Style
& rBLTR
, /// Style of the processed bottom-left to top-right diagonal frame border.
668 const Style
& rTLFromB
, /// Vertical frame border from bottom to top-left end of rTLBR.
669 const Style
& rTLFromR
, /// Horizontal frame border from right to top-left end of rTLBR.
670 const Style
& rBRFromT
, /// Vertical frame border from top to bottom-right end of rTLBR.
671 const Style
& rBRFromL
, /// Horizontal frame border from left to bottom-right end of rTLBR.
673 const Style
& rBLFromT
, /// Vertical frame border from top to bottom-left end of rBLTR.
674 const Style
& rBLFromR
, /// Horizontal frame border from right to bottom-left end of rBLTR.
675 const Style
& rTRFromB
, /// Vertical frame border from bottom to top-right end of rBLTR.
676 const Style
& rTRFromL
, /// Horizontal frame border from left to top-right end of rBLTR.
678 const Color
* pForceColor
= 0, /// If specified, overrides frame border color.
679 bool bDiagDblClip
= false /// true = Use clipping for crossing double frame borders.
687 /* Yes, I love ASCII art. :-) -DR- */
691 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */