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
9336c763
Commit
9336c763
authored
Dec 05, 2014
by
EricOuellet
Browse files
SvgDocument.Draw support different bitmap size as svg default size
parent
4cd65121
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/SvgDocument.cs
View file @
9336c763
...
...
@@ -465,11 +465,18 @@ namespace Svg
try
{
using
(
var
renderer
=
SvgRenderer
.
FromImage
(
bitmap
))
{
renderer
.
SetBoundable
(
new
GenericBoundable
(
0
,
0
,
bitmap
.
Width
,
bitmap
.
Height
));
this
.
Render
(
renderer
);
}
using
(
var
renderer
=
SvgRenderer
.
FromImage
(
bitmap
))
{
renderer
.
SetBoundable
(
new
GenericBoundable
(
0
,
0
,
bitmap
.
Width
,
bitmap
.
Height
));
//EO, 2014-12-05: Requested to ensure proper zooming (draw the svg in the bitmap size, ==> proper scaling)
renderer
.
ScaleTransform
(
bitmap
.
Width
/
this
.
Width
,
bitmap
.
Height
/
this
.
Height
);
//EO, 2014-12-05: Requested to ensure proper zooming out, reduce size. Otherwise it clip the image.
this
.
Overflow
=
SvgOverflow
.
auto
;
this
.
Render
(
renderer
);
}
}
catch
{
...
...
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