Git Product home page Git Product logo

bitmapdata_for_easeljs's Introduction

BitmapData for EaselJS

BitmapData for EaselJS adds AS3 like BitmapData to EaselJS.

Example1

// create BitmapData by HTMLImageElement
_bmd01 = new createjs.BitmapData(HTMLImageElement);
_bitmap01 = new createjs.Bitmap(_bmd01.canvas);
_stage.addChild(_bitmap01);
var width = 200;
var height = 200;
var fillColor = 0x80FF0000;
// create BitmapData by fill
_bmd02 = new createjs.BitmapData(null, width, height, fillColor);
_bitmap02 = new createjs.Bitmap(_bmd02.canvas);
_stage.addChild(_bitmap02);

Example2

_shape = new createjs.Shape();
var g = _shape.graphics;
g.f("rgba(0, 0, 255, 1)").dp(0, 0, 100, 5, 0.6, -90).ef();
_shape.cache(-100, -100, 200, 200);
// get BitmapData from cached DisplayObject
_bmd01 = createjs.BitmapData.getBitmapData(_shape);
var colorTransform = new createjs.ColorTransform(1, 1, 0, 1, 255);
var rect = new createjs.Rectangle(0, 0, _bmd01.width >> 1, _bmd01.height);
_bmd01.colorTransform(rect, colorTransform);
_stage.addChild(_shape);

Properties

  • canvas
  • context
  • name
  • width [read only]
  • height [read only]
  • rect [read only]

Methods

  • applyFilter
  • clearRect
  • clone
  • colorTransform
  • compare
  • copyChannel
  • copyPixels
  • dispose
  • draw
  • drawImage
  • expand
  • fillRect
  • floodFill
  • getBitmapData [static]
  • getColorBoundsRect
  • getPixel
  • getPixel32
  • getPixels
  • histogram
  • hitTest
  • merge
  • noise
  • paletteMap
  • perlinNoise
  • pixelDissolve
  • scroll
  • setPixel
  • setPixel32
  • setPixels
  • threshold
  • toString
  • updateContext
  • updateImageData

Resources

Contact and bug reports

License

MIT License

bitmapdata_for_easeljs's People

Contributors

mmmpa avatar u-kudox avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.