Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
ae333749
Commit
ae333749
authored
Sep 26, 2014
by
Tebjan Halm
Browse files
Revert "Performance Improvement"
parent
13132300
Changes
27
Hide whitespace changes
Inline
Side-by-side
Source/Painting/SvgRadialGradientServer.cs
View file @
ae333749
...
...
@@ -127,7 +127,7 @@ namespace Svg
using
(
var
transform
=
EffectiveGradientTransform
)
{
var
bounds
=
renderer
.
GetBoundable
().
Calculate
Bounds
()
;
var
bounds
=
renderer
.
GetBoundable
().
Bounds
;
transform
.
Translate
(
bounds
.
X
,
bounds
.
Y
,
MatrixOrder
.
Prepend
);
if
(
this
.
GradientUnits
==
SvgCoordinateUnits
.
ObjectBoundingBox
)
{
...
...
Source/Paths/SvgPath.cs
View file @
ae333749
...
...
@@ -114,10 +114,10 @@ namespace Svg
/// <summary>
/// Gets the bounds of the element.
/// </summary>
/// <
returns
>The bounds.</
returns
>
public
override
RectangleF
Calculate
Bounds
()
/// <
value
>The bounds.</
value
>
public
override
System
.
Drawing
.
RectangleF
Bounds
{
return
this
.
Path
(
null
).
GetBounds
();
get
{
return
this
.
Path
(
null
).
GetBounds
();
}
}
/// <summary>
...
...
Source/Rendering/SvgRenderer.cs
View file @
ae333749
...
...
@@ -18,7 +18,7 @@ namespace Svg
public
void
SetBoundable
(
ISvgBoundable
boundable
)
{
_boundables
.
Push
(
new
ImmutableBoundable
(
boundable
)
)
;
_boundables
.
Push
(
boundable
);
}
public
ISvgBoundable
GetBoundable
()
{
...
...
Source/Svg.csproj
View file @
ae333749
...
...
@@ -109,7 +109,6 @@
<Compile
Include=
"Document Structure\SvgSymbol.cs"
/>
<Compile
Include=
"Filter Effects\ImageBuffer.cs"
/>
<Compile
Include=
"Painting\GenericBoundable.cs"
/>
<Compile
Include=
"Painting\ImmutableBoundable.cs"
/>
<Compile
Include=
"Painting\SvgFallbackPaintServer .cs"
/>
<Compile
Include=
"Paths\CoordinateParser.cs"
/>
<Compile
Include=
"Rendering\IGraphicsProvider.cs"
/>
...
...
Source/SvgElement.cs
View file @
ae333749
...
...
@@ -1162,4 +1162,4 @@ namespace Svg
void
Render
(
ISvgRenderer
renderer
);
}
}
}
\ No newline at end of file
Source/Text/SvgGlyph.cs
View file @
ae333749
...
...
@@ -91,10 +91,10 @@ namespace Svg
/// <summary>
/// Gets the bounds of the element.
/// </summary>
/// <
returns
>The bounds.</
returns
>
public
override
System
.
Drawing
.
RectangleF
Calculate
Bounds
()
/// <
value
>The bounds.</
value
>
public
override
System
.
Drawing
.
RectangleF
Bounds
{
return
this
.
Path
(
null
).
GetBounds
();
get
{
return
this
.
Path
(
null
).
GetBounds
();
}
}
/// <summary>
...
...
Source/Text/SvgTextBase.cs
View file @
ae333749
...
...
@@ -227,15 +227,18 @@ namespace Svg
/// <summary>
/// Gets the bounds of the element.
/// </summary>
/// <
returns
>The bounds.</
returns
>
public
override
RectangleF
Calculate
Bounds
()
/// <
value
>The bounds.</
value
>
public
override
System
.
Drawing
.
RectangleF
Bounds
{
var
path
=
this
.
Path
(
null
);
foreach
(
var
elem
in
this
.
Children
.
OfType
<
SvgVisualElement
>())
get
{
path
.
AddPath
(
elem
.
Path
(
null
),
false
);
var
path
=
this
.
Path
(
null
);
foreach
(
var
elem
in
this
.
Children
.
OfType
<
SvgVisualElement
>())
{
path
.
AddPath
(
elem
.
Path
(
null
),
false
);
}
return
path
.
GetBounds
();
}
return
path
.
GetBounds
();
}
/// <summary>
...
...
@@ -492,9 +495,19 @@ namespace Svg
_width
=
width
;
}
public
RectangleF
CalculateBounds
()
public
PointF
Location
{
get
{
return
PointF
.
Empty
;
}
}
public
SizeF
Size
{
get
{
return
new
SizeF
(
_width
,
_font
.
Size
);
}
}
public
RectangleF
Bounds
{
return
new
RectangleF
(
PointF
.
Empty
,
new
SizeF
(
_width
,
_font
.
Size
)
)
;
get
{
return
new
RectangleF
(
this
.
Location
,
this
.
Size
);
}
}
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment