summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2017-08-31 14:05:12 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2017-09-15 12:58:03 +0200
commit2813d70f4a7e5522db1056352cd646a585a5c5d0 (patch)
treeaa9bf0ee8486d054552947fe1388f093d0ce6b91 /include/svx
parenta9c59cbfb9e16469b389db0b4d6befe196d0e2a0 (diff)
borderline: move geometry creation to linear algebra
Adapted Array::DrawRange to Style/Vector usages, feeding new CreateBorderPrimitives method. That one roughly feeds the old implementations to test and check (and keep working) Change-Id: I09557f826cd023d27db6b53e53aa69c149308711
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/framelink.hxx49
1 files changed, 22 insertions, 27 deletions
diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx
index d0fb165eef79..3efd7165c75a 100644
--- a/include/svx/framelink.hxx
+++ b/include/svx/framelink.hxx
@@ -334,41 +334,36 @@ SVX_DLLPUBLIC void CreateBorderPrimitives(
const Color* pForceColor /// If specified, overrides frame border color.
);
-/** Draws both diagonal frame borders, regards all connected frame styles.
-
-One or both passed diagonal frame styles may be invisible.
-
-The function preserves all settings of the passed output device.
-*/
-SVX_DLLPUBLIC void CreateDiagFrameBorderPrimitives(
- drawinglayer::primitive2d::Primitive2DContainer& rTarget, /// target for created primitives
-
- const basegfx::B2DPoint& rOrigin, /// Origin of the coordinate system spawning the cell
- const basegfx::B2DVector& rXAxis, /// X-Axis of the coordinate system spawning the cell
- const basegfx::B2DVector& rYAxis, /// Y-Axis of the coordinate system spawning the cell
+class StyleVectorCombination
+{
+private:
+ const Style& mrStyle;
+ const basegfx::B2DVector& mrB2DVector;
- const Style& rTLBR, /// Style of the processed top-left to bottom-right diagonal frame border.
- const Style& rBLTR, /// Style of the processed bottom-left to top-right diagonal frame border.
+public:
+ StyleVectorCombination(const Style& rStyle, const basegfx::B2DVector& rB2DVector) :
+ mrStyle(rStyle),
+ mrB2DVector(rB2DVector)
+ {}
- const Style& rTLFromB, /// Vertical frame border from bottom to top-left end of rTLBR.
- const Style& rTLFromR, /// Horizontal frame border from right to top-left end of rTLBR.
- const Style& rBRFromT, /// Vertical frame border from top to bottom-right end of rTLBR.
- const Style& rBRFromL, /// Horizontal frame border from left to bottom-right end of rTLBR.
+ const Style& getStyle() const { return mrStyle; }
+ const basegfx::B2DVector& getB2DVector() const { return mrB2DVector; }
+};
- const Style& rBLFromT, /// Vertical frame border from top to bottom-left end of rBLTR.
- const Style& rBLFromR, /// Horizontal frame border from right to bottom-left end of rBLTR.
- const Style& rTRFromB, /// Vertical frame border from bottom to top-right end of rBLTR.
- const Style& rTRFromL, /// Horizontal frame border from left to top-right end of rBLTR.
+typedef std::vector< StyleVectorCombination > StyleVectorTable;
- const Color* pForceColor /// If specified, overrides frame border color.
+SVX_DLLPUBLIC void CreateBorderPrimitives(
+ drawinglayer::primitive2d::Primitive2DContainer& rTarget, /// target for created primitives
+ const basegfx::B2DPoint& rOrigin, /// start point of borderline
+ const basegfx::B2DVector& rX, /// X-Axis of borderline with length
+ const Style& rBorder, /// Style of borderline
+ const StyleVectorTable& rStartStyleVectorTable, /// Styles and vectors (pointing away) at borderline start, ccw
+ const StyleVectorTable& rEndStyleVectorTable, /// Styles and vectors (pointing away) at borderline end, cw
+ const Color* pForceColor /// If specified, overrides frame border color.
);
-
}
}
-/* Yes, I love ASCII art. :-) -DR- */
-
#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */