Svg Builder

JAXB Classes for SVG

Лицензия

Лицензия

Группа

Группа

com.github.rahulsom
Идентификатор

Идентификатор

svg-builder
Последняя версия

Последняя версия

0.3.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Svg Builder
JAXB Classes for SVG
Ссылка на сайт

Ссылка на сайт

https://github.com/rahulsom/svg-builder
Система контроля версий

Система контроля версий

https://github.com/rahulsom/svg-builder

Скачать svg-builder

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.rahulsom/svg-builder/ -->
<dependency>
    <groupId>com.github.rahulsom</groupId>
    <artifactId>svg-builder</artifactId>
    <version>0.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.rahulsom/svg-builder/
implementation 'com.github.rahulsom:svg-builder:0.3.1'
// https://jarcasting.com/artifacts/com.github.rahulsom/svg-builder/
implementation ("com.github.rahulsom:svg-builder:0.3.1")
'com.github.rahulsom:svg-builder:jar:0.3.1'
<dependency org="com.github.rahulsom" name="svg-builder" rev="0.3.1">
  <artifact name="svg-builder" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.rahulsom', module='svg-builder', version='0.3.1')
)
libraryDependencies += "com.github.rahulsom" % "svg-builder" % "0.3.1"
[com.github.rahulsom/svg-builder "0.3.1"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.30
org.spockframework : spock-core jar 1.3-groovy-2.5

Модули Проекта

Данный проект не имеет модулей.

License MavenCentral

SVG Builder

JAXB Classes for SVG.

Usage

In Java code, the fluent API can be used to build SVG

ObjectFactory objectFactory = new ObjectFactory();
Svg svg = objectFactory.createSvg().withHeight("3").withWidth("7").
        withSVGDescriptionClassOrSVGAnimationClassOrSVGStructureClass(
                objectFactory.createCircle(
                        objectFactory.createCircle()
                ),
                objectFactory.createA(
                        objectFactory.createSVGHyperlinkClass()
                )
        );

In Groovy code, the same can be done. Alternately a simpler DSL can be used.

@NewifySvg
void foo() {
    def svg =
        Svg(height: '3', width: '7').content {
            it << Circle()
            it << SVGHyperlinkClass()
        }
}

Similarly, in Kotlin you could do this

val svg = Svg().withHeight("3").withWidth("7")
    .content {
        add(Circle())
        add(SVGHyperlinkClass())
    }

The resulting object is like any JAXB Root Element and can be marshaled from that point on.

Версии библиотеки

Версия
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0