SlideShare a Scribd company logo
1 of 21
“Fabric Js –
Javascript HTML5 canvas library”
Presented by “Sreehari K”
“We help build and architect IT solutions”
About Cubet
Founded in 2007, Cubet Techno Labs
is an end-to-end SMAC (social,
mobile, analytics and cloud) consulting
company with offices at Kochi, India
and London, UK. With expertise in
insightful product strategy, well-crafted
design and proficient development for
high-end web and mobile application
technologies.
Where we stand
Visit – www.cubettech.com
Introduction
Visit – www.cubettech.com
 Javascript library that makes working with
HTML5 canvas
 Create shapes, paths, multi-line text etc.
 Manipulate object’s properties
 Add gradients or filters
Visit – www.cubettech.com
Group objects together and manipulate
Add shadow, make it draggable
Fully open-source project
Created on 2008
Canvas
Visit – www.cubettech.com
Create absolutely amazing graphics on the web
Syntax
<canvas id="myCanvas" width="200" height="100">
</canvas>
Why Fabric?
Visit – www.cubettech.com
Helps to solve problems while using native APIs
How?
Visit – www.cubettech.com
Using native API to draw a rectangle
// reference canvas element (with id="myCanvas")
var canvas = document.getElementById('myCanvas');
// get 2d context to draw on (the "bitmap" mentioned earlier)
var ctx = canvas.getContext('2d');
// set fill color of context
ctx.fillStyle = 'red';
// create rectangle at 100, 100 point, with 20x20 dimensions
ctx.fillRect(100, 100, 20, 20);
Visit – www.cubettech.com
Using FabricJs to draw a rectangle
// create a wrapper around native canvas element (with
id="'myCanvas'")
var canvas = new fabric.Canvas(''myCanvas'');
// create a rectangle object
var rect = new fabric.Rect({
left: 100, top: 100, fill: 'red', width: 20, height: 20 });
// "add" rectangle onto canvas
canvas.add(rect);
Objects
Visit – www.cubettech.com
Fabric covers other basic shapes as well — circles, triangles,
ellipses, and so on
Some basic shapes provided in Fabric:
 fabric.Circle
 fabric.Ellipse
 fabric.Line
 fabric.Polygon
 fabric.Polyline
 fabric.Rect
 fabric.Triangle
Example
Visit – www.cubettech.com
var circle = new fabric.Circle({
radius: 20, fill: 'green', left: 100, top: 100
});
canvas.add(circle);
var triangle = new fabric.Triangle({
width: 20, height: 30, fill: 'blue', left: 50, top: 50
});
canvas.add( triangle);
Canvas
Visit – www.cubettech.com
• Serves as a wrapper around <canvas> element
var canvas = new fabric.Canvas('c');
var rect = new fabric.Rect();
canvas.add(rect); // add object
canvas.item(0); // reference fabric.Rect added earlier (first object)
canvas.getObjects(); // get all objects on canvas (rect will be first and
only)
canvas.remove(rect); // remove previously-added fabric.Rect
Text
Visit – www.cubettech.com
• Allows you to add text
fabric.Text
Allow working with text in an object oriented fashion
Provides a much richer functionality than what canvas
gives
 Multiline support
 Text alignment
 Text background
 Text decoration
 Line height
Text - Example
Visit – www.cubettech.com
var text = new fabric.Text('hello world', { left: 100, top: 100
});
canvas.add(text);
var underlineText = new fabric.Text("I'm an underlined
text", {
textDecoration: 'underline'
});
Free drawing
Visit – www.cubettech.com
isDrawingMode = true/false;
freeDrawingBrush
* freeDrawingBrush.color
* freeDrawingBrush.width
Manipulating objects
Visit – www.cubettech.com
Use set method
Change object properties (color, opacity, size, position)
var canvas = new fabric.Canvas('c');
var rect = new fabric.Rect({
left: 100, top: 100, fill: blue, width: 20, height: 20 });
canvas.add(rect);
rect.set('fill', 'red');
Interactivity
Visit – www.cubettech.com
Allow users to interact directly with objects on canvas
History
Visit – www.cubettech.com
Juriy Zaytsev - Founder
Created Fabric.js in 2008, when starting to
work on his startup — Printio.ru
Started as a foundation for design editor on
printio.ru
Supported browsers
Visit – www.cubettech.com
Firefox 2+
Safari 3+
Opera 9.64+
Chrome (all versions)
IE10, IE11, Edge
Our Technologies Stack:
Server Side Application JavaScript Frameworks
Mobile App Development
Database System and Cloud
Visit – www.cubettech.com
THANKS!
ANY QUESTIONS? PLEASE GET IN TOUCH!
www.cubettech.com
Email : info@cubettech.com
sales@cubettech.com
Skype : cubet.se
Phone: +91 484 405 4324
Contact us:
Kemp House
160 City Road
London- EC1V2NX,
UK.info@cubettech.com
+44 2071938618
Carnival Info Park,
Unit IX-C, 9th floor
PhaseIV,
Kochi, Kerala, India
info@cubettech.com
+91 484 4054324

More Related Content

What's hot

Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptAdieu
 
React Context API
React Context APIReact Context API
React Context APINodeXperts
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By PalashPalashBajpai
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...Edureka!
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout Rachel Andrew
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.jsEmanuele DelBono
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An IntroductionManvendra Singh
 
CSS Box Model Presentation
CSS Box Model PresentationCSS Box Model Presentation
CSS Box Model PresentationReed Crouch
 
Javascript - Array - Creating Array
Javascript - Array - Creating ArrayJavascript - Array - Creating Array
Javascript - Array - Creating ArraySamuel Santos
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid LayoutRachel Andrew
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arraysHassan Dar
 
Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Davide Di Pumpo
 
React state
React  stateReact  state
React stateDucat
 

What's hot (20)

Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
React js
React jsReact js
React js
 
Flex box
Flex boxFlex box
Flex box
 
React Context API
React Context APIReact Context API
React Context API
 
CSS framework By Palash
CSS framework By PalashCSS framework By Palash
CSS framework By Palash
 
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
jQuery Tutorial For Beginners | Developing User Interface (UI) Using jQuery |...
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
Introducing CSS Grid
Introducing CSS GridIntroducing CSS Grid
Introducing CSS Grid
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
CSS Box Model Presentation
CSS Box Model PresentationCSS Box Model Presentation
CSS Box Model Presentation
 
Javascript - Array - Creating Array
Javascript - Array - Creating ArrayJavascript - Array - Creating Array
Javascript - Array - Creating Array
 
Flexbox and Grid Layout
Flexbox and Grid LayoutFlexbox and Grid Layout
Flexbox and Grid Layout
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016Understanding flex box CSS Day 2016
Understanding flex box CSS Day 2016
 
React state
React  stateReact  state
React state
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
The Power of CSS Flexbox
The Power of CSS FlexboxThe Power of CSS Flexbox
The Power of CSS Flexbox
 

Similar to Fabricjs ppt

Similar to Fabricjs ppt (20)

Plunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s beginPlunge into HTML5 Canvas – Let’s begin
Plunge into HTML5 Canvas – Let’s begin
 
Canvas in html5
Canvas in html5Canvas in html5
Canvas in html5
 
The canvas tag
The canvas tagThe canvas tag
The canvas tag
 
The Canvas Tag
The Canvas TagThe Canvas Tag
The Canvas Tag
 
Html5
Html5Html5
Html5
 
New Elements & Features in HTML5
New Elements & Features in HTML5New Elements & Features in HTML5
New Elements & Features in HTML5
 
Html5
Html5Html5
Html5
 
HTML5 Canvas @SuperMondays, Newcastle
HTML5 Canvas @SuperMondays, NewcastleHTML5 Canvas @SuperMondays, Newcastle
HTML5 Canvas @SuperMondays, Newcastle
 
Drawing with the HTML5 Canvas
Drawing with the HTML5 CanvasDrawing with the HTML5 Canvas
Drawing with the HTML5 Canvas
 
HTML5 canvas
HTML5 canvasHTML5 canvas
HTML5 canvas
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web components
 
HTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the WebHTML5 Canvas - The Future of Graphics on the Web
HTML5 Canvas - The Future of Graphics on the Web
 
Iagc2
Iagc2Iagc2
Iagc2
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web components
 
Houdini - What lies ahead
Houdini - What lies aheadHoudini - What lies ahead
Houdini - What lies ahead
 
HTML 5 Canvas & SVG
HTML 5 Canvas & SVGHTML 5 Canvas & SVG
HTML 5 Canvas & SVG
 
HTML5 Canvas
HTML5 CanvasHTML5 Canvas
HTML5 Canvas
 
Html canvas
Html canvasHtml canvas
Html canvas
 
Canvas - HTML 5
Canvas - HTML 5Canvas - HTML 5
Canvas - HTML 5
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 

More from Cubet Techno Labs

More from Cubet Techno Labs (6)

Sass_Cubet seminar
Sass_Cubet seminarSass_Cubet seminar
Sass_Cubet seminar
 
Drupal_cubet seminar
Drupal_cubet seminarDrupal_cubet seminar
Drupal_cubet seminar
 
Let's start with REDUX
Let's start with REDUXLet's start with REDUX
Let's start with REDUX
 
JMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar pptJMeter_ Cubet Seminar ppt
JMeter_ Cubet Seminar ppt
 
An Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using ProtractorAn Introduction to AngularJS End to End Testing using Protractor
An Introduction to AngularJS End to End Testing using Protractor
 
Angularjs 2
Angularjs 2 Angularjs 2
Angularjs 2
 

Recently uploaded

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Fabricjs ppt

  • 1. “Fabric Js – Javascript HTML5 canvas library” Presented by “Sreehari K” “We help build and architect IT solutions”
  • 2. About Cubet Founded in 2007, Cubet Techno Labs is an end-to-end SMAC (social, mobile, analytics and cloud) consulting company with offices at Kochi, India and London, UK. With expertise in insightful product strategy, well-crafted design and proficient development for high-end web and mobile application technologies. Where we stand Visit – www.cubettech.com
  • 3. Introduction Visit – www.cubettech.com  Javascript library that makes working with HTML5 canvas  Create shapes, paths, multi-line text etc.  Manipulate object’s properties  Add gradients or filters
  • 4. Visit – www.cubettech.com Group objects together and manipulate Add shadow, make it draggable Fully open-source project Created on 2008
  • 5. Canvas Visit – www.cubettech.com Create absolutely amazing graphics on the web Syntax <canvas id="myCanvas" width="200" height="100"> </canvas>
  • 6. Why Fabric? Visit – www.cubettech.com Helps to solve problems while using native APIs
  • 7. How? Visit – www.cubettech.com Using native API to draw a rectangle // reference canvas element (with id="myCanvas") var canvas = document.getElementById('myCanvas'); // get 2d context to draw on (the "bitmap" mentioned earlier) var ctx = canvas.getContext('2d'); // set fill color of context ctx.fillStyle = 'red'; // create rectangle at 100, 100 point, with 20x20 dimensions ctx.fillRect(100, 100, 20, 20);
  • 8. Visit – www.cubettech.com Using FabricJs to draw a rectangle // create a wrapper around native canvas element (with id="'myCanvas'") var canvas = new fabric.Canvas(''myCanvas''); // create a rectangle object var rect = new fabric.Rect({ left: 100, top: 100, fill: 'red', width: 20, height: 20 }); // "add" rectangle onto canvas canvas.add(rect);
  • 9. Objects Visit – www.cubettech.com Fabric covers other basic shapes as well — circles, triangles, ellipses, and so on Some basic shapes provided in Fabric:  fabric.Circle  fabric.Ellipse  fabric.Line  fabric.Polygon  fabric.Polyline  fabric.Rect  fabric.Triangle
  • 10. Example Visit – www.cubettech.com var circle = new fabric.Circle({ radius: 20, fill: 'green', left: 100, top: 100 }); canvas.add(circle); var triangle = new fabric.Triangle({ width: 20, height: 30, fill: 'blue', left: 50, top: 50 }); canvas.add( triangle);
  • 11. Canvas Visit – www.cubettech.com • Serves as a wrapper around <canvas> element var canvas = new fabric.Canvas('c'); var rect = new fabric.Rect(); canvas.add(rect); // add object canvas.item(0); // reference fabric.Rect added earlier (first object) canvas.getObjects(); // get all objects on canvas (rect will be first and only) canvas.remove(rect); // remove previously-added fabric.Rect
  • 12. Text Visit – www.cubettech.com • Allows you to add text fabric.Text Allow working with text in an object oriented fashion Provides a much richer functionality than what canvas gives  Multiline support  Text alignment  Text background  Text decoration  Line height
  • 13. Text - Example Visit – www.cubettech.com var text = new fabric.Text('hello world', { left: 100, top: 100 }); canvas.add(text); var underlineText = new fabric.Text("I'm an underlined text", { textDecoration: 'underline' });
  • 14. Free drawing Visit – www.cubettech.com isDrawingMode = true/false; freeDrawingBrush * freeDrawingBrush.color * freeDrawingBrush.width
  • 15. Manipulating objects Visit – www.cubettech.com Use set method Change object properties (color, opacity, size, position) var canvas = new fabric.Canvas('c'); var rect = new fabric.Rect({ left: 100, top: 100, fill: blue, width: 20, height: 20 }); canvas.add(rect); rect.set('fill', 'red');
  • 16. Interactivity Visit – www.cubettech.com Allow users to interact directly with objects on canvas
  • 17. History Visit – www.cubettech.com Juriy Zaytsev - Founder Created Fabric.js in 2008, when starting to work on his startup — Printio.ru Started as a foundation for design editor on printio.ru
  • 18. Supported browsers Visit – www.cubettech.com Firefox 2+ Safari 3+ Opera 9.64+ Chrome (all versions) IE10, IE11, Edge
  • 19. Our Technologies Stack: Server Side Application JavaScript Frameworks Mobile App Development Database System and Cloud Visit – www.cubettech.com
  • 20. THANKS! ANY QUESTIONS? PLEASE GET IN TOUCH! www.cubettech.com Email : info@cubettech.com sales@cubettech.com Skype : cubet.se Phone: +91 484 405 4324
  • 21. Contact us: Kemp House 160 City Road London- EC1V2NX, UK.info@cubettech.com +44 2071938618 Carnival Info Park, Unit IX-C, 9th floor PhaseIV, Kochi, Kerala, India info@cubettech.com +91 484 4054324