background preloader


Facebook Twitter

Scalable Vector Graphics (SVG) - Beginner's Guide - Hongkiat. Vector graphics have been widely applied in print media.

Scalable Vector Graphics (SVG) - Beginner's Guide - Hongkiat

In a website, we can also add vector graphics with SVG or Scalable Vector Graphic. Citing from the official spec at, SVG is described as: A language for describing two-dimensional graphics in XML. SVG allows for three types of ßgraphic objects: vector graphic shapes (e.g., paths consisting of straight lines and curves), images and text. SVG tests. SVG To RaphaelJS Converter - Ready.Set.Raphael. Beta 2. SVG Introduction SVG is short for Scalable Vector Graphics.

It is a graphic format in which the shapes are specified in XML. The XML is then rendered by an SVG viewer. Today most web browser can display SVG just like they can display PNG, GIF, and JPG. Quick Tip: How to draw a star with SVG and Javascript. SVG provides a powerful way to create graphics that will scale to any size in your application.

Quick Tip: How to draw a star with SVG and Javascript

It’s easy enough to draw a star, but you need to work with the polygon shape to work with. Ideally you’d want a way to calculate your star shapes, similar to how you can specify a radius or width/height with circles and rectangles. Fortunately there is a way to calculate the points on a star, and here is how. To calculate the points on our star, we bring trigonometry to the rescue! Thank to a StackOverflow answer (written in Java), we know that a basic star is simply a fixed set of points on a circle, equidistant from each other. With SVG, we simply need to define the points in our polygon (star) and it will do all the hard work of connecting the lines and filling in the space. When using the D3 library, we can easily append our star with the following syntax: After you apply a little CSS formatting you get the final result (as applied onto a map) There you have it!

Hope this helps! Like this: Furious Bob » Blog Archive » Having fun with javascript and Raphael. Gosh it has been a long time.

Furious Bob » Blog Archive » Having fun with javascript and Raphael

From the last time I wrote something I’ve moved from Brazil to Ireland and I now work at LMI Ericsson Athlone. I’m still a java Engineer, but lately I’m having lots of fun in my spare time with Javascript, JQuery, HTML5 and other languages. After all, Oracle acquired Sun, and I belive it is time to move on … So, I’m facing some visualization challenges at work, which made me find Raphael which is the best SVG library I could ever find. After lots of fun, the docs are really easy to understand, I’ve started a few projects of my own. Manipulate canvas background color in Raphael by using variable paper. Movable and re-sizable rectangle using Raphael SVG. Raphaël · Drag-n-drop.

Context Menus for RaphaelJS. Lazy Line Painter. Relics of the life of a software developer. Working with Raphael JS Library on Tizen. This article describes the Raphael JavaScript Library and how to work with it on Tizen.

Working with Raphael JS Library on Tizen

You will learn how to draw simple 2D shapes: built-in (rectangles, circle, ellipse) and other (using paths), how to work with attributes of Raphael elements and create simple animations. You will also learn how to manipulate elements (move, scale and rotate). Ben.Knows.Code(): Finding Points Along an SVG Path using Raphael. In my last post, I discussed how using paths with Raphael is a good thing and that certain functions in the library only work with SVG elements of type "path".

Ben.Knows.Code(): Finding Points Along an SVG Path using Raphael

Now I'm going to do something a little more complex with paths which will utilize these functions. I've posted a demo on my sandbox which implements a slider like control that is bound to a SVG path. Typically, you'd be restricted to a slider that basically moves over a straight line - up/down or left/right. With this functionality, all kinds of slider controls can be created.

With the tools in Raphael, this feature is pretty easy to implement. First, we need to create a path that will serve as the constraint for our slider knob. Ben.Knows.Code(): Raphaël: Getting/Setting SVG Element Attributes. Raphaël is a nice library for working with SVG objects.

Ben.Knows.Code(): Raphaël: Getting/Setting SVG Element Attributes

It uses a similar syntax to jQuery for getting/setting attribute properties on an element. Unlike the normal DOM elements which use the style attribute to manage the appearance of an element, SVG uses individual attributes in the tag to define the styling options (some of these can also be placed in the style tag, but for consistency, I prefer using attributes). As a result, when working with SVG elements, you make heavy use of the attr() function instead of the css() function. Both have an identical syntax, however, the css() function only affects the style attribute of the element. Creating Responsive and Interactive Animations with Raphael.js. This tutorial will teach you how to animate SVG images using the JavaScript library Raphael.js and other open source tools.

Creating Responsive and Interactive Animations with Raphael.js

When you’ve finished this tutorial, you’ll have learned how to make a spinning windmill that will scale up our down with your responsive web design. It will look like this: More Raphael Examples. Tooltips in Raphael. Camera/camera.xhtml. Example. Raphael.sketchpad.js~ at master · b3457m0d3/ Raphael SketchPad. Raphael.sketchpad Creates a Raphael SketchPad widget.

Raphael SketchPad

Parameters container Raphael or string options object Possible options attributes width number (100) height number (100) input string (null) strokes array (empty array) update_input boolean (false) paper. Projects/svgweb/samples/demo.html?name=anim1&svg.render.forceflash=false. Gwheels with Raphaël – part 1. As a way to learn Raphaël I want play with cogwheels.

gwheels with Raphaël – part 1

I will build this up gradually. This is the first installment. Let’s begin with two cogs. RaphaëlJs Tutorial. RaphaëlJs Tutorial Author: Sebastián Gurin Copyright (c) 2012 SEBASTIAN GURIN. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Read the Full License Text. Introduction to Raphaël.js. Introduction SVG, short for Scalable Vector Graphics, is a XML-based language for describing objects and scenes. Drag n' Drop In Raphael.js - John Wesley Todd - A javascript application developer.

How to Create Dynamic SVG's with Raphaël - Brick By Brick from The Brick Factory. Over the last few years I have heard more and more good things about the javascript library Raphaël. A project I was working on recently afforded me the opportunity to experiment with it fully. I discovered that it is really powerful and actually fun and easy to work with. Helper V4:Rapha l 2 Additional Helper... Database 4.... Wait... Notes... Initialising New(3rd June) RaphaëlJs Tutorial.