mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-09 22:32:48 -05:00
39 lines
1 KiB
JavaScript
39 lines
1 KiB
JavaScript
|
/*
|
||
|
* Paper.js
|
||
|
*
|
||
|
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
|
||
|
* based on Scriptographer.org and designed to be largely API compatible.
|
||
|
* http://paperjs.org/
|
||
|
* http://scriptographer.org/
|
||
|
*
|
||
|
* Distributed under the MIT license. See LICENSE file for details.
|
||
|
*
|
||
|
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
|
||
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
||
|
*
|
||
|
* All rights reserved.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @name PlacedItem
|
||
|
*
|
||
|
* @class The PlacedItem class is the base for any items that have a matrix
|
||
|
* associated with them, describing their placement in the project, such as
|
||
|
* {@link Raster} and {@link PlacedSymbol}.
|
||
|
*
|
||
|
* @extends Item
|
||
|
*/
|
||
|
var PlacedItem = this.PlacedItem = Item.extend(/** @lends PlacedItem# */{
|
||
|
|
||
|
_transform: function(matrix, flags) {
|
||
|
// In order to set the right context transformation when drawing the
|
||
|
// raster, simply preconcatenate the internal matrix with the provided
|
||
|
// one.
|
||
|
this.matrix.preConcatenate(matrix);
|
||
|
},
|
||
|
|
||
|
getStrokeBounds: function() {
|
||
|
return this.getBounds();
|
||
|
}
|
||
|
});
|