save
This commit is contained in:
parent
b4f711c93d
commit
f8a1653e86
3 changed files with 203 additions and 0 deletions
|
|
@ -98,6 +98,7 @@ func Rect(r *Runner, shape d2target.Shape) (string, error) {
|
|||
pathEl := d2themes.NewThemableElement("path")
|
||||
pathEl.SetTranslate(float64(shape.Pos.X), float64(shape.Pos.Y))
|
||||
pathEl.Fill, pathEl.Stroke = d2themes.ShapeTheme(shape)
|
||||
pathEl.FillPattern = shape.FillPattern
|
||||
pathEl.ClassName = "shape"
|
||||
pathEl.Style = shape.CSSStyle()
|
||||
for _, p := range paths {
|
||||
|
|
@ -145,6 +146,7 @@ func DoubleRect(r *Runner, shape d2target.Shape) (string, error) {
|
|||
pathEl := d2themes.NewThemableElement("path")
|
||||
pathEl.SetTranslate(float64(shape.Pos.X), float64(shape.Pos.Y))
|
||||
pathEl.Fill, pathEl.Stroke = d2themes.ShapeTheme(shape)
|
||||
pathEl.FillPattern = shape.FillPattern
|
||||
pathEl.ClassName = "shape"
|
||||
pathEl.Style = shape.CSSStyle()
|
||||
for _, p := range pathsBigRect {
|
||||
|
|
|
|||
|
|
@ -1058,6 +1058,58 @@ something
|
|||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "dots",
|
||||
script: `
|
||||
NETWORK: {
|
||||
style: {
|
||||
stroke: black
|
||||
fill-pattern: dots
|
||||
double-border: true
|
||||
fill: "#E7E9EE"
|
||||
font: mono
|
||||
}
|
||||
CELL TOWER: {
|
||||
style: {
|
||||
stroke: black
|
||||
fill-pattern: dots
|
||||
fill: "#F5F6F9"
|
||||
font: mono
|
||||
}
|
||||
satellites: SATELLITES {
|
||||
shape: stored_data
|
||||
style: {
|
||||
font: mono
|
||||
fill: white
|
||||
stroke: black
|
||||
multiple: true
|
||||
}
|
||||
}
|
||||
|
||||
transmitter: TRANSMITTER {
|
||||
style: {
|
||||
font: mono
|
||||
fill: white
|
||||
stroke: black
|
||||
}
|
||||
}
|
||||
|
||||
satellites -> transmitter: SEND {
|
||||
style.stroke: black
|
||||
style.font: mono
|
||||
}
|
||||
satellites -> transmitter: SEND {
|
||||
style.stroke: black
|
||||
style.font: mono
|
||||
}
|
||||
satellites -> transmitter: SEND {
|
||||
style.stroke: black
|
||||
style.font: mono
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
},
|
||||
}
|
||||
runa(t, tcs)
|
||||
}
|
||||
|
|
|
|||
149
d2renderers/d2sketch/testdata/dots/sketch.exp.svg
vendored
Normal file
149
d2renderers/d2sketch/testdata/dots/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 316 KiB |
Loading…
Reference in a new issue