Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Instant RaphaelJS Starter
Instant RaphaelJS Starter
Instant RaphaelJS Starter
Ebook137 pages39 minutes

Instant RaphaelJS Starter

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. Starter Guide This book is great for developers new to Vector graphics in browsers (SVG and VML), and who are looking to get a good grounding in how to use Raphael JS to create imageless and fast loading interactive drawings and shapes, in a web browser. It’s assumed that you will have some experience in HTML JavaScript or jQuery already.
LanguageEnglish
Release dateJan 25, 2013
ISBN9781782169864
Instant RaphaelJS Starter

Related to Instant RaphaelJS Starter

Related ebooks

Programming For You

View More

Related articles

Reviews for Instant RaphaelJS Starter

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Instant RaphaelJS Starter - A.Krishna sagar

    Table of Contents

    Instant RaphaelJS Starter

    Credits

    About the Author

    About the Reviewer

    www.packtpub.com

    Support files, eBooks, discount offers and more

    packtLib.packtpub.com

    Why Subscribe?

    Free Access for Packt account holders

    1. Instant RaphaelJS Starter

    So, what is RaphaelJS?

    Two-headed and three-lettered

    The marriage of two problems and the birth of RaphaelJS

    JavaScript – the binder of oddities

    Browser support

    What is RaphaelJS and what is not RaphaelJS?

    A little about vector and raster graphics

    RaphaelJS as a vector

    The x, y positioning that RaphaelJS uses

    Installation

    Step 1 – What do I need?

    Step 2 – Downloading RaphaelJS

    Step 3 – Adding it to the HTML

    And that's it!

    Quick start – creating your first shape

    Step 1 – Creating a canvas to draw on

    Creating a canvas in the browser's viewport

    Creating an object in an element (recommended)

    Step 2 – Drawing the circle

    The attr() method

    Top features you need to know about

    Creating a Raphael element

    Basic shape

    Rectangle

    Rounded rectangle

    Ellipse

    Complex shapes

    Extracting and using paths from an editor

    Vector graphics editors

    Step 1 – Creating the shape in the vector editor

    Step 2 – Saving the shape as SVG

    Step 3 – Copying the SVG path string

    Step 4 – Using the copied path as a Raphael path string

    Creating text

    Manipulating the style of the element

    Transforming an element

    Manipulating a shape

    Animating a shape

    Animating transformations

    Adding events to Raphael elements

    Click event

    Mouseover event

    Methods you'll want to know and use

    Element methods

    animate()

    attr()

    click()

    dblclick()

    mousedown()

    mouseup()

    mousemove()

    mouseover()

    mouseout()

    clone()

    data()

    removedata()

    getBBox()

    getPointAtLength()

    toFront()

    toBack()

    hide()

    show()

    transform()

    remove()

    Paper methods

    paper.circle()

    paper.ellipse()

    paper.rect()

    paper.clear()

    paper.image()

    paper.setSize()

    paper.set()

    Set methods

    set.clear()

    set.exclude()

    set.forEach()

    set.pop()

    set.splice()

    People and places you should get to know

    Official sites

    Articles and tutorials

    Community

    Blogs

    Twitter

    Summary

    Instant RaphaelJS Starter


    Instant RaphaelJS Starter

    Copyright © 2013 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: January 2013

    Production Reference: 1180113

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB,

    Enjoying the preview?
    Page 1 of 1