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
36881dd7
Unverified
Commit
36881dd7
authored
Jan 06, 2019
by
mrbean-bremen
Browse files
Use color "not set" if currentColor is not defined instead of color "none"
- set correct default for fill/stroke unset color - fixes #398
parent
62bd4760
Changes
5
Hide whitespace changes
Inline
Side-by-side
Source/Painting/SvgColourServer.cs
View file @
36881dd7
...
...
@@ -39,7 +39,10 @@ namespace Svg
{
//is none?
if
(
this
==
SvgPaintServer
.
None
)
return
new
SolidBrush
(
System
.
Drawing
.
Color
.
Transparent
);
// default fill color is black, default stroke color is none
if
(
this
==
SvgColourServer
.
NotSet
)
return
new
SolidBrush
(
forStroke
?
System
.
Drawing
.
Color
.
Transparent
:
System
.
Drawing
.
Color
.
Black
);
int
alpha
=
(
int
)
Math
.
Round
((
opacity
*
(
this
.
Colour
.
A
/
255.0
)
)
*
255
);
Color
colour
=
System
.
Drawing
.
Color
.
FromArgb
(
alpha
,
this
.
Colour
);
...
...
Source/Painting/SvgDeferredPaintServer.cs
View file @
36881dd7
...
...
@@ -35,7 +35,7 @@ namespace Svg
where
e
.
Color
!=
SvgPaintServer
.
None
&&
e
.
Color
!=
SvgColourServer
.
NotSet
&&
e
.
Color
!=
SvgColourServer
.
Inherit
&&
e
.
Color
!=
SvgColourServer
.
None
select
e
).
FirstOrDefault
();
_concreteServer
=
(
colorElement
==
null
?
Svg
Paint
Server
.
No
ne
:
colorElement
.
Color
);
_concreteServer
=
(
colorElement
==
null
?
Svg
Colour
Server
.
No
tSet
:
colorElement
.
Color
);
}
else
{
...
...
Tests/Svg.UnitTests/PassingTests.csv
View file @
36881dd7
...
...
@@ -186,8 +186,9 @@ __issue-323-02
__issue-323-03
__issue-329-01
__issue-338-01_stroke_width
__issue-385-01_Test_text-anchor-middle
__issue-398-01
__pull_request-373-01
__pull_request-374-01
__issue-385-01_Test_text-anchor-middle
__Telefunken_FuBK_test_pattern
__title
\ No newline at end of file
Tests/W3CTestSuite/png/__issue-398-01.png
0 → 100644
View file @
36881dd7
869 Bytes
Tests/W3CTestSuite/svg/__issue-398-01.svg
0 → 100644
View file @
36881dd7
<svg
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"11.331ex"
height=
"2.843ex"
style=
"vertical-align: -0.838ex;"
viewBox=
"0 -863.1 4878.7 1223.9"
role=
"img"
focusable=
"false"
xmlns=
"http://www.w3.org/2000/svg"
aria-labelledby=
"MathJax-SVG-1-Title"
>
<title
id=
"MathJax-SVG-1-Title"
>
{\displaystyle G=(V,E)}
</title>
<defs
aria-hidden=
"true"
>
<path
stroke-width=
"1"
id=
"E1-MJMATHI-47"
d=
"M50 252Q50 367 117 473T286 641T490 704Q580 704 633 653Q642 643 648 636T656 626L657 623Q660 623 684 649Q691 655 699 663T715 679T725 690L740 705H746Q760 705 760 698Q760 694 728 561Q692 422 692 421Q690 416 687 415T669 413H653Q647 419 647 422Q647 423 648 429T650 449T651 481Q651 552 619 605T510 659Q492 659 471 656T418 643T357 615T294 567T236 496T189 394T158 260Q156 242 156 221Q156 173 170 136T206 79T256 45T308 28T353 24Q407 24 452 47T514 106Q517 114 529 161T541 214Q541 222 528 224T468 227H431Q425 233 425 235T427 254Q431 267 437 273H454Q494 271 594 271Q634 271 659 271T695 272T707 272Q721 272 721 263Q721 261 719 249Q714 230 709 228Q706 227 694 227Q674 227 653 224Q646 221 643 215T629 164Q620 131 614 108Q589 6 586 3Q584 1 581 1Q571 1 553 21T530 52Q530 53 528 52T522 47Q448 -22 322 -22Q201 -22 126 55T50 252Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMAIN-3D"
d=
"M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMAIN-28"
d=
"M94 250Q94 319 104 381T127 488T164 576T202 643T244 695T277 729T302 750H315H319Q333 750 333 741Q333 738 316 720T275 667T226 581T184 443T167 250T184 58T225 -81T274 -167T316 -220T333 -241Q333 -250 318 -250H315H302L274 -226Q180 -141 137 -14T94 250Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMATHI-56"
d=
"M52 648Q52 670 65 683H76Q118 680 181 680Q299 680 320 683H330Q336 677 336 674T334 656Q329 641 325 637H304Q282 635 274 635Q245 630 242 620Q242 618 271 369T301 118L374 235Q447 352 520 471T595 594Q599 601 599 609Q599 633 555 637Q537 637 537 648Q537 649 539 661Q542 675 545 679T558 683Q560 683 570 683T604 682T668 681Q737 681 755 683H762Q769 676 769 672Q769 655 760 640Q757 637 743 637Q730 636 719 635T698 630T682 623T670 615T660 608T652 599T645 592L452 282Q272 -9 266 -16Q263 -18 259 -21L241 -22H234Q216 -22 216 -15Q213 -9 177 305Q139 623 138 626Q133 637 76 637H59Q52 642 52 648Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMAIN-2C"
d=
"M78 35T78 60T94 103T137 121Q165 121 187 96T210 8Q210 -27 201 -60T180 -117T154 -158T130 -185T117 -194Q113 -194 104 -185T95 -172Q95 -168 106 -156T131 -126T157 -76T173 -3V9L172 8Q170 7 167 6T161 3T152 1T140 0Q113 0 96 17Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMATHI-45"
d=
"M492 213Q472 213 472 226Q472 230 477 250T482 285Q482 316 461 323T364 330H312Q311 328 277 192T243 52Q243 48 254 48T334 46Q428 46 458 48T518 61Q567 77 599 117T670 248Q680 270 683 272Q690 274 698 274Q718 274 718 261Q613 7 608 2Q605 0 322 0H133Q31 0 31 11Q31 13 34 25Q38 41 42 43T65 46Q92 46 125 49Q139 52 144 61Q146 66 215 342T285 622Q285 629 281 629Q273 632 228 634H197Q191 640 191 642T193 659Q197 676 203 680H757Q764 676 764 669Q764 664 751 557T737 447Q735 440 717 440H705Q698 445 698 453L701 476Q704 500 704 528Q704 558 697 578T678 609T643 625T596 632T532 634H485Q397 633 392 631Q388 629 386 622Q385 619 355 499T324 377Q347 376 372 376H398Q464 376 489 391T534 472Q538 488 540 490T557 493Q562 493 565 493T570 492T572 491T574 487T577 483L544 351Q511 218 508 216Q505 213 492 213Z"
></path>
<path
stroke-width=
"1"
id=
"E1-MJMAIN-29"
d=
"M60 749L64 750Q69 750 74 750H86L114 726Q208 641 251 514T294 250Q294 182 284 119T261 12T224 -76T186 -143T145 -194T113 -227T90 -246Q87 -249 86 -250H74Q66 -250 63 -250T58 -247T55 -238Q56 -237 66 -225Q221 -64 221 250T66 725Q56 737 55 738Q55 746 60 749Z"
></path>
</defs>
<g
stroke=
"currentColor"
fill=
"currentColor"
stroke-width=
"0"
transform=
"matrix(1 0 0 -1 0 0)"
aria-hidden=
"true"
>
<use
xlink:href=
"#E1-MJMATHI-47"
x=
"0"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMAIN-3D"
x=
"1064"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMAIN-28"
x=
"2120"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMATHI-56"
x=
"2510"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMAIN-2C"
x=
"3279"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMATHI-45"
x=
"3724"
y=
"0"
></use>
<use
xlink:href=
"#E1-MJMAIN-29"
x=
"4489"
y=
"0"
></use>
</g>
</svg>
\ No newline at end of file
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