• This repository has been archived on 12/Jul/2023
  • Stars
    star
    260
  • Rank 157,189 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 15 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Import raw SVG data into Raphael

Important!

I switched from raphael to svg.js for all my vector graphics because svg.js is only a fraction of raphael's size and supports much more core SVG features. Therefore this plugin is no longer supported. Similar functionality can be found in svg.js itself.

Raphaël SVG Import plugin - 0.0.4

What is it?

An extension to the Raphael Vector Library. It enables Raphael to import raw SVG data.

Usage

var paper = Raphael(10, 10, 800, 500);
paper.importSVG('<svg><rect x="50" y="50" fill="#FF00FF" width="100" height="100" /></svg>');

If you want the imported elements to be grouped in a set, pass the set as an optional parameter:

var paper = Raphael(10, 10, 800, 500);
var set = paper.set();
paper.importSVG('<svg><rect x="50" y="50" fill="#FF00FF" width="100" height="100" /></svg>', set);

You can export a svg file from Inkscape or Illustrator, open it with a plain text editor and dump it in there.
The plugin will filter out the necessary.

In the assets folder a demo.svg file is provided. Nothing fancy but it gives you a starting point.

Dependencies

To-do

  • SVG group to Raphael set conversion
  • line recognition
  • text recognition
  • image recognition

Contributing to Raphael SVG Import

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2011 Wout Fierens. See LICENSE.txt for further details.

More Repositories

1

chronology.js

A micro javascript library for managing an undo/redo history
JavaScript
45
star
2

rosetta

A blazing fast internationalization (i18n) library for Crystal with compile-time key lookup.
Crystal
39
star
3

base_x

A Crystal shard for base encoding / decoding of any given alphabet with optional bitcoin-style leading zero compression.
Crystal
12
star
4

lucky_vite

A Crystal shard to seamlessly integrate Vite with Lucky Framework
Crystal
7
star
5

dat-metadata-standard

A metadata standard for storing Distributed Artifact Tokens, or DATs, on the Cardano blockchain.
6
star
6

dendro

The source code for the DendroRithms generator
Crystal
5
star
7

mailjet.cr

Mailjet API Client for Crystal https://app.mailjet.com
Crystal
4
star
8

innate.js

A micro library eliminating the need for jQuery in most common tasks.
JavaScript
4
star
9

lucky_svg_sprite

Generate sanitized SVG icon sprites as Lucky-flavored components from folders of separate icons.
Crystal
4
star
10

packlink.cr

Packlink API client for Crystal https://pro.packlink.com
Crystal
4
star
11

spec_mirror.cr

Develoment utility to run a mirroring spec whenever a source file is saved.
Crystal
3
star
12

lucky_favicon

Add favicons from the Real Favicon Generator to your Lucky project.
Crystal
3
star
13

svg.onchain.js

A micro JS library for manipulating and animating SVG.
JavaScript
3
star
14

trustfeed.js

A library-agnostic micro API wrapper for Trustpilot.
JavaScript
2
star
15

vite-plugin-lucky

A plugin for using Vite with Lucky Framework
TypeScript
2
star
16

cardano_json_api

A JSON:API-compliant REST API for the Cardano blockchain built with Crystal and Lucky Framework
Crystal
2
star
17

kdtree.onchain.js

A micro JS library for building K-Dimensional Trees with N-Nearest Neighbours Search.
JavaScript
2
star
18

go_squared

A Ruby Gem wrapping the gosquared.com API
Ruby
2
star
19

bezier.onchain.js

A micro JS library for building SVG bezier paths from an arrays of points.
JavaScript
2
star
20

venster-examples

A repo with example implementations of the DAT Metadata Standard.
JavaScript
1
star
21

easing.onchain.js

A micro JS library for falloffs using various easing methods.
JavaScript
1
star
22

MediumAsMessage

Website for mediumasmessage.xyz
HTML
1
star
23

rate_limiter

A rate limiter implementation in Crystal
Crystal
1
star
24

cardano-kit

At toolkit for Crystal to ease development for the Cardano blockchain.
Crystal
1
star
25

svg.fromhtml.js

A plugin for svg.js library converting HTML into SVG
1
star
26

venster-external-dependencies

Venster's external dependencies for on-chain browser-based DATs.
1
star
27

venster-internal-assets

A repo holding all internal assets of venster.io
1
star
28

bech32

A BIP173/BIP350 compatible Bech32/Bech32m encoding/decoding library for Crystal.
Crystal
1
star
29

matrix.onchain.js

A micro JS library for matrix operations.
JavaScript
1
star
30

lucky_svg_sprite_cli

CLI to generate Lucky Framework-flavored SVG icon sprite components from a folder of icons.
Crystal
1
star
31

venster-docs

Documentation page for the venster app and DAT metadata standard
CSS
1
star
32

svg.adopt.js

A plugin for the svg.js library adopt existing inline svg's
1
star
33

wout.github.io

SVG.js website
HTML
1
star
34

circle.onchain.js

A micro JS library with circle-related utility functions.
JavaScript
1
star
35

prng.onchain.js

A micro JS implementation of the Mulberry32 seedable pseudorandom number generator.
JavaScript
1
star
36

svg_chok

A micro app to visualise Sverchok SVG output.
Crystal
1
star