Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Symbol #111

@Nickleaton

Description

@Nickleaton
 <symbol id="myDot" width="10" height="10" viewBox="0 0 2 2">
    <circle cx="1" cy="1" r="1" />
  </symbol>

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/symbol

The mozilla docs imply you should be able to use width and height on a symbol.

import unittest

from svgwrite.container import Symbol


class TestSymbolHeightWidth(unittest.TestCase):

    def test_symbol(self):
        symbol = Symbol(id_="myDot", viewBox="0 0 2 2")
        self.assertIsNotNone(symbol)

    def test_size(self):
        symbol = Symbol(id_="myDot", viewBox="0 0 2 2", size=(10, 10))
        self.assertIsNotNone(symbol)

    def test_height_width(self):
        symbol = Symbol(id_="myDot", viewBox="0 0 2 2", height=100, width=100)
        self.assertIsNotNone(symbol)


if __name__ == '__main__':  # pragma: no cover
    unittest.main()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions