sdrrectangleprimitive2d.cxx (f6e50924) sdrrectangleprimitive2d.cxx (64b14621)
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

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

45 Primitive2DSequence aRetval;
46
47 // create unit outline polygon
48 const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(
49 basegfx::B2DRange(0.0, 0.0, 1.0, 1.0),
50 getCornerRadiusX(),
51 getCornerRadiusY()));
52
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

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

45 Primitive2DSequence aRetval;
46
47 // create unit outline polygon
48 const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(
49 basegfx::B2DRange(0.0, 0.0, 1.0, 1.0),
50 getCornerRadiusX(),
51 getCornerRadiusY()));
52
53 // add fill
54 if(!getSdrLFSTAttribute().getFill().isDefault())
55 {
56 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
53 // add fill
54 if(!getSdrLFSTAttribute().getFill().isDefault())
55 {
56 basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
57
58 aTransformed.transform(getTransform());
59 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
57 createPolyPolygonFillPrimitive(
60 createPolyPolygonFillPrimitive(
58 basegfx::B2DPolyPolygon(aUnitOutline),
59 getTransform(),
61 aTransformed,
60 getSdrLFSTAttribute().getFill(),
61 getSdrLFSTAttribute().getFillFloatTransGradient()));
62 }
63 else if(getForceFillForHitTest())
64 {
65 // if no fill and it's a text frame, create a fill for HitTest and
66 // BoundRect fallback
67 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
68 createHiddenGeometryPrimitives2D(
69 true,
70 basegfx::B2DPolyPolygon(aUnitOutline),
71 getTransform()));
72 }
73
62 getSdrLFSTAttribute().getFill(),
63 getSdrLFSTAttribute().getFillFloatTransGradient()));
64 }
65 else if(getForceFillForHitTest())
66 {
67 // if no fill and it's a text frame, create a fill for HitTest and
68 // BoundRect fallback
69 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
70 createHiddenGeometryPrimitives2D(
71 true,
72 basegfx::B2DPolyPolygon(aUnitOutline),
73 getTransform()));
74 }
75
74 // add line
75 if(!getSdrLFSTAttribute().getLine().isDefault())
76 {
77 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
76 // add line
77 if(!getSdrLFSTAttribute().getLine().isDefault())
78 {
79 basegfx::B2DPolygon aTransformed(aUnitOutline);
80
81 aTransformed.transform(getTransform());
82 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
78 createPolygonLinePrimitive(
83 createPolygonLinePrimitive(
79 aUnitOutline,
80 getTransform(),
84 aTransformed,
81 getSdrLFSTAttribute().getLine(),
85 getSdrLFSTAttribute().getLine(),
82 attribute::SdrLineStartEndAttribute()));
83 }
86 attribute::SdrLineStartEndAttribute()));
87 }
84 else if(!getForceFillForHitTest())
85 {
86 // if initially no line is defined and it's not a text frame, create
87 // a line for HitTest and BoundRect
88 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
89 createHiddenGeometryPrimitives2D(
90 false,
91 basegfx::B2DPolyPolygon(aUnitOutline),

--- 67 unchanged lines hidden ---
88 else if(!getForceFillForHitTest())
89 {
90 // if initially no line is defined and it's not a text frame, create
91 // a line for HitTest and BoundRect
92 appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
93 createHiddenGeometryPrimitives2D(
94 false,
95 basegfx::B2DPolyPolygon(aUnitOutline),

--- 67 unchanged lines hidden ---