svgbob icon indicating copy to clipboard operation
svgbob copied to clipboard

Triangle filling is not working

Open kingelilol opened this issue 2 years ago • 3 comments

Hi,

I've tried to fill a triangle, but it does not work.

This is my testcase:

+---+ +-----+ + +---------+ +
|{r}|  \{r}/ / \ \       / / \
+---+   \ / /{r}\ \ {r} / /   \
         + +-----+ \   / / {r} \
+-----+             \ / /       \
|     |              + +---------+
| {r} |
|     |
+-----+

# Legend:
r = {
    fill: red;
}

test

kingelilol avatar Feb 28 '22 08:02 kingelilol

This is not yet supported, tagged shapes with css is only applied to rectangles and circles for now.

ivanceras avatar Mar 01 '22 06:03 ivanceras

I guess that the same issue with

 +-----+------+
 |G {g}| B {b}|
 +-----+------+
 | {r} | {g}  |
 +-----+------+

 +---+
 |{g}|
 +---+

# Legend:
r = {
    stroke: red;
    fill: red;
}
g = {
    fill: green;
}
b = {
    fill: blue;
}

Which gives image

hfiguiere avatar Dec 01 '23 01:12 hfiguiere

The tagging is limited only to a detached limited shape primitives such as circle and rect. If it is touching or very close or inside another shape, the algorithm breaks.

ivanceras avatar Dec 01 '23 01:12 ivanceras