mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
image fills can now be scaled to simulate image cropping. Now that image fills can be offset and scaled, the Image Shape is now obsolute because any shape can now use regular images or cropped images.
This commit is contained in:
@@ -127,6 +127,9 @@ Kinetic.Shape.prototype = {
|
||||
|
||||
context.save();
|
||||
|
||||
if(fill.scale !== undefined) {
|
||||
context.scale(fill.scale.x, fill.scale.y);
|
||||
}
|
||||
if(fill.offset !== undefined) {
|
||||
context.translate(fill.offset.x, fill.offset.y);
|
||||
}
|
||||
|
Reference in New Issue
Block a user