Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
10 years ago
by
Tebjan Halm
Browse files
Options
Download
Plain Diff
Merge pull request #121 from Stardraw/master
Parse Exponent stop-opacity
parents
8b1211c5
4611b2c5
master
netstandard2
nuget2.4.2
nuget2.4.1
nuget2.4
nuget2.3
nuget2.2.2
nuget2.2.1
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/External/ExCSS/Lexer.cs
+5
-1
Source/External/ExCSS/Lexer.cs
Source/Filter Effects/SvgFilter.cs
+5
-1
Source/Filter Effects/SvgFilter.cs
Source/Filter Effects/feColourMatrix/SvgColourMatrix.cs
+5
-2
Source/Filter Effects/feColourMatrix/SvgColourMatrix.cs
with
15 additions
and
4 deletions
+15
-4
Source/External/ExCSS/Lexer.cs
+
5
-
1
View file @
3237abc1
...
...
@@ -710,13 +710,17 @@ namespace ExCSS
}
private
Block
NumberFraction
(
char
current
)
{
{
while
(
true
)
{
if
(
current
.
IsDigit
())
{
_buffer
.
Append
(
current
);
}
else
if
(
"eE%-"
.
IndexOf
(
current
)
>=
0
)
{
break
;
}
else
if
(
current
.
IsNameStart
())
{
var
number
=
FlushBuffer
();
...
...
This diff is collapsed.
Click to expand it.
Source/Filter Effects/SvgFilter.cs
+
5
-
1
View file @
3237abc1
...
...
@@ -124,6 +124,10 @@ namespace Svg.FilterEffects
var
inflate
=
0.5f
;
var
transform
=
GetTransform
(
element
);
var
bounds
=
GetPathBounds
(
element
,
renderer
,
transform
);
if
(
bounds
.
Width
==
0
||
bounds
.
Height
==
0
)
return
;
var
buffer
=
new
ImageBuffer
(
bounds
,
inflate
,
renderer
,
renderMethod
)
{
Transform
=
transform
};
IEnumerable
<
SvgFilterPrimitive
>
primitives
=
this
.
Children
.
OfType
<
SvgFilterPrimitive
>();
...
...
@@ -137,7 +141,7 @@ namespace Svg.FilterEffects
// Render the final filtered image
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
prevClip
=
renderer
.
GetClip
();
renderer
.
SetClip
(
new
Region
(
imgDraw
));
...
...
This diff is collapsed.
Click to expand it.
Source/Filter Effects/feColourMatrix/SvgColourMatrix.cs
+
5
-
2
View file @
3237abc1
...
...
@@ -33,7 +33,10 @@ namespace Svg.FilterEffects
public
override
void
Process
(
ImageBuffer
buffer
)
{
var
inputImage
=
buffer
[
this
.
Input
];
var
inputImage
=
buffer
[
this
.
Input
];
if
(
inputImage
==
null
)
return
;
float
[][]
colorMatrixElements
;
float
value
;
...
...
@@ -75,7 +78,7 @@ namespace Svg.FilterEffects
};
break
;
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
][];
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help