canvg

WebJar for canvg

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bowergithub.shprink
Идентификатор

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

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

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

1.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

canvg
WebJar for canvg
Ссылка на сайт

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

http://webjars.org
Система контроля версий

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

https://github.com/shprink/canvg

Скачать canvg

Имя Файла Размер
canvg-1.3.0.pom
canvg-1.3.0.jar 83 KB
canvg-1.3.0-sources.jar 22 bytes
canvg-1.3.0-javadoc.jar 22 bytes
Обзор

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

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.shprink/canvg/ -->
<dependency>
    <groupId>org.webjars.bowergithub.shprink</groupId>
    <artifactId>canvg</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.shprink/canvg/
implementation 'org.webjars.bowergithub.shprink:canvg:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.shprink/canvg/
implementation ("org.webjars.bowergithub.shprink:canvg:1.3.0")
'org.webjars.bowergithub.shprink:canvg:jar:1.3.0'
<dependency org="org.webjars.bowergithub.shprink" name="canvg" rev="1.3.0">
  <artifact name="canvg" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.shprink', module='canvg', version='1.3.0')
)
libraryDependencies += "org.webjars.bowergithub.shprink" % "canvg" % "1.3.0"
[org.webjars.bowergithub.shprink/canvg "1.3.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

canvg

[Mirror for bower] Javascript SVG parser and renderer on Canvas: https://code.google.com/p/canvg/

<script type="text/javascript" src="dist/canvg.bundle.min.js"></script> 

Put a canvas on your page

<canvas id="canvas" width="1000px" height="600px"></canvas> 

Example canvg calls:

<script type="text/javascript">
window.onload = function() {
  //load '../path/to/your.svg' in the canvas with id = 'canvas'
  canvg('canvas', '../path/to/your.svg')

  //load a svg snippet in the canvas with id = 'drawingArea'
  canvg(document.getElementById('drawingArea'), '<svg>...</svg>')

  //ignore mouse events and animation
  canvg('canvas', 'file.svg', { ignoreMouse: true, ignoreAnimation: true }) 
}
</script>

The third parameter is options:

  • log: true => console.log information
  • ignoreMouse: true => ignore mouse events
  • ignoreAnimation: true => ignore animations
  • ignoreDimensions: true => does not try to resize canvas
  • ignoreClear: true => does not clear canvas
  • offsetX: int => draws at a x offset
  • offsetY: int => draws at a y offset
  • scaleWidth: int => scales horizontally to width
  • scaleHeight: int => scales vertically to height
  • renderCallback: function => will call the function after the first render is completed
  • forceRedraw: function => will call the function on every frame, if it returns true, will redraw
  • useCORS: true => will attempt to use CORS on images to not taint canvas

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

Версия
1.3.0