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
3237abc1
Commit
3237abc1
authored
Jan 10, 2015
by
Tebjan Halm
Browse files
Merge pull request #121 from Stardraw/master
Parse Exponent stop-opacity
parents
8b1211c5
4611b2c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Source/External/ExCSS/Lexer.cs
View file @
3237abc1
...
@@ -717,6 +717,10 @@ namespace ExCSS
...
@@ -717,6 +717,10 @@ namespace ExCSS
{
{
_buffer
.
Append
(
current
);
_buffer
.
Append
(
current
);
}
}
else
if
(
"eE%-"
.
IndexOf
(
current
)
>=
0
)
{
break
;
}
else
if
(
current
.
IsNameStart
())
else
if
(
current
.
IsNameStart
())
{
{
var
number
=
FlushBuffer
();
var
number
=
FlushBuffer
();
...
...
Source/Filter Effects/SvgFilter.cs
View file @
3237abc1
...
@@ -124,6 +124,10 @@ namespace Svg.FilterEffects
...
@@ -124,6 +124,10 @@ namespace Svg.FilterEffects
var
inflate
=
0.5f
;
var
inflate
=
0.5f
;
var
transform
=
GetTransform
(
element
);
var
transform
=
GetTransform
(
element
);
var
bounds
=
GetPathBounds
(
element
,
renderer
,
transform
);
var
bounds
=
GetPathBounds
(
element
,
renderer
,
transform
);
if
(
bounds
.
Width
==
0
||
bounds
.
Height
==
0
)
return
;
var
buffer
=
new
ImageBuffer
(
bounds
,
inflate
,
renderer
,
renderMethod
)
{
Transform
=
transform
};
var
buffer
=
new
ImageBuffer
(
bounds
,
inflate
,
renderer
,
renderMethod
)
{
Transform
=
transform
};
IEnumerable
<
SvgFilterPrimitive
>
primitives
=
this
.
Children
.
OfType
<
SvgFilterPrimitive
>();
IEnumerable
<
SvgFilterPrimitive
>
primitives
=
this
.
Children
.
OfType
<
SvgFilterPrimitive
>();
...
@@ -137,7 +141,7 @@ namespace Svg.FilterEffects
...
@@ -137,7 +141,7 @@ namespace Svg.FilterEffects
// Render the final filtered image
// Render the final filtered image
var
bufferImg
=
buffer
.
Buffer
;
var
bufferImg
=
buffer
.
Buffer
;
bufferImg
.
Save
(
@"C:\test.png"
);
//
bufferImg.Save(@"C:\test.png");
var
imgDraw
=
RectangleF
.
Inflate
(
bounds
,
inflate
*
bounds
.
Width
,
inflate
*
bounds
.
Height
);
var
imgDraw
=
RectangleF
.
Inflate
(
bounds
,
inflate
*
bounds
.
Width
,
inflate
*
bounds
.
Height
);
var
prevClip
=
renderer
.
GetClip
();
var
prevClip
=
renderer
.
GetClip
();
renderer
.
SetClip
(
new
Region
(
imgDraw
));
renderer
.
SetClip
(
new
Region
(
imgDraw
));
...
...
Source/Filter Effects/feColourMatrix/SvgColourMatrix.cs
View file @
3237abc1
...
@@ -35,6 +35,9 @@ namespace Svg.FilterEffects
...
@@ -35,6 +35,9 @@ namespace Svg.FilterEffects
{
{
var
inputImage
=
buffer
[
this
.
Input
];
var
inputImage
=
buffer
[
this
.
Input
];
if
(
inputImage
==
null
)
return
;
float
[][]
colorMatrixElements
;
float
[][]
colorMatrixElements
;
float
value
;
float
value
;
switch
(
this
.
Type
)
switch
(
this
.
Type
)
...
@@ -75,7 +78,7 @@ namespace Svg.FilterEffects
...
@@ -75,7 +78,7 @@ namespace Svg.FilterEffects
};
};
break
;
break
;
default
:
// Matrix
default
:
// Matrix
var
parts
=
this
.
Values
.
Split
(
new
char
[]
{
' '
,
'\t'
,
'\n'
,
'\r'
,
','
});
var
parts
=
this
.
Values
.
Replace
(
" "
,
" "
).
Split
(
new
char
[]
{
' '
,
'\t'
,
'\n'
,
'\r'
,
','
});
colorMatrixElements
=
new
float
[
5
][];
colorMatrixElements
=
new
float
[
5
][];
for
(
int
i
=
0
;
i
<
4
;
i
++)
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
{
...
...
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