summaryrefslogtreecommitdiff
path: root/svx/inc
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2011-02-22 15:18:16 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-19 17:57:19 +0100
commit8fe4b54be1b618e066b9f3b8f8ea159dcd6beec6 (patch)
treee7176439fd7c43b7942d20bd07fc7bc4e552e0a2 /svx/inc
parent3800c9d28cd42348dcc194b39d87af8e36b752ef (diff)
svx::frame::DrawRange has now a drawinglayer equivalent
Diffstat (limited to 'svx/inc')
-rwxr-xr-xsvx/inc/svx/framelink.hxx66
-rwxr-xr-xsvx/inc/svx/framelinkarray.hxx8
2 files changed, 74 insertions, 0 deletions
diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx
index 6cfc8f0f7a..2d550d1263 100755
--- a/svx/inc/svx/framelink.hxx
+++ b/svx/inc/svx/framelink.hxx
@@ -461,22 +461,88 @@ SVX_DLLPUBLIC bool CheckFrameBorderConnectable(
// Drawing functions
// ============================================================================
+/** Draws a horizontal frame border, regards all connected frame styles.
+
+ The frame style to draw is passed as parameter rBorder. The function
+ calculates the adjustment in X direction for left and right end of primary
+ and secondary line of the frame border (the style may present a double
+ line). The line ends may differ according to the connected frame styles
+ coming from top, bottom, left, right, and/or diagonal.
+
+ Thick frame styles are always drawn centered (in width) to the passed
+ reference points. The Y coordinates of both reference points must be equal
+ (the line cannot be drawn slanted).
+
+ The function preserves all settings of the passed output device.
+
+ All parameters starting with "rL" refer to the left end of the processed
+ frame border, all parameters starting with "rR" refer to the right end.
+ The following part of the parameter name starting with "From" specifies
+ where the frame border comes from. Example: "rLFromTR" means the frame
+ border coming from top-right, connected to the left end of rBorder (and
+ therefore a diagonal frame border).
+
+ The follong picture shows the meaning of all passed parameters:
+
+ rLFromT / \ rRFromT
+ | / \ |
+ | rLFromTR rRFromTL |
+ | / \ |
+ | / \ |
+ --- rLFromL --- ============== rBorder ============== --- rRFromR ---
+ | \ / |
+ | \ / |
+ | rLFromBR rRFromBL |
+ | \ / |
+ rLFromB \ / rRFromB
+ */
SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
const Point& rLPos, /// Reference point for left end of the processed frame border.
const Point& rRPos, /// Reference point for right end of the processed frame border.
const Style& rBorder, /// Style of the processed frame border.
+ const DiagStyle& rLFromTR, /// Diagonal frame border from top-right to left end of rBorder.
const Style& rLFromT, /// Vertical frame border from top to left end of rBorder.
const Style& rLFromL, /// Horizontal frame border from left to left end of rBorder.
const Style& rLFromB, /// Vertical frame border from bottom to left end of rBorder.
+ const DiagStyle& rLFromBR, /// Diagonal frame border from bottom-right to left end of rBorder.
+ const DiagStyle& rRFromTL, /// Diagonal frame border from top-left to right end of rBorder.
const Style& rRFromT, /// Vertical frame border from top to right end of rBorder.
const Style& rRFromR, /// Horizontal frame border from right to right end of rBorder.
const Style& rRFromB, /// Vertical frame border from bottom to right end of rBorder.
+ const DiagStyle& rRFromBL, /// Diagonal frame border from bottom-left to right end of rBorder.
+
+ const Color* pForceColor = 0 /// If specified, overrides frame border color.
+);
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+ const Point& rLPos, /// Reference point for left end of the processed frame border.
+ const Point& rRPos, /// Reference point for right end of the processed frame border.
+ const Style& rBorder, /// Style of the frame border to draw.
const Color* pForceColor = 0 /// If specified, overrides frame border color.
);
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
+ const Point& rLPos, /// Reference point for left end of the processed frame border.
+ const Point& rRPos, /// Reference point for right end of the processed frame border.
+ const Style& rBorder, /// Style of the processed frame border.
+
+ const Style& rLFromT, /// Vertical frame border from top to left end of rBorder.
+ const Style& rLFromL, /// Horizontal frame border from left to left end of rBorder.
+ const Style& rLFromB, /// Vertical frame border from bottom to left end of rBorder.
+
+ const Style& rRFromT, /// Vertical frame border from top to right end of rBorder.
+ const Style& rRFromR, /// Horizontal frame border from right to right end of rBorder.
+ const Style& rRFromB, /// Vertical frame border from bottom to right end of rBorder.
+
+ const Color* pForceColor = 0 /// If specified, overrides frame border color.
+);
+
+SVX_DLLPUBLIC drawinglayer::primitive2d::Primitive2DSequence CreateClippedBorderPrimitives (
+ const Point& rStart, const Point& rEnd, const Style& rBorder,
+ const Rectangle& rClipRect );
+
/** Draws a horizontal frame border, regards all connected frame styles.
The frame style to draw is passed as parameter rBorder. The function
diff --git a/svx/inc/svx/framelinkarray.hxx b/svx/inc/svx/framelinkarray.hxx
index 2b0e7b0c82..fd155d6f0f 100755
--- a/svx/inc/svx/framelinkarray.hxx
+++ b/svx/inc/svx/framelinkarray.hxx
@@ -30,6 +30,7 @@
#define SVX_FRAMELINKARRAY_HXX
#include <svx/framelink.hxx>
+#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <memory>
@@ -507,6 +508,13 @@ public:
If not NULL, only this color will be used to draw all frame borders. */
void DrawCell( OutputDevice& rDev, size_t nCol, size_t nRow,
const Color* pForceColor = 0 ) const;
+ /** Draws the part of the specified range, that is inside the clipping range.
+ @param pForceColor
+ If not NULL, only this color will be used to draw all frame borders. */
+ void DrawRange( drawinglayer::processor2d::BaseProcessor2D* rDev,
+ size_t nFirstCol, size_t nFirstRow,
+ size_t nLastCol, size_t nLastRow,
+ const Color* pForceColor = 0 ) const;
/** Draws the part of the specified range, that is inside the clipping range.
@param pForceColor