Updated to match API changes in Beta3.
InvocationRegistration had a constructor called Registration. I wonder if that was causing the compile error with beta2. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4104 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
package com.threerings.media.image {
|
||||
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Shape;
|
||||
import flash.display.TextField;
|
||||
|
||||
import flash.geom.Point;
|
||||
import flash.geom.Rectangle;
|
||||
|
||||
import flash.text.TextField;
|
||||
import flash.text.TextLineMetrics;
|
||||
|
||||
/**
|
||||
@@ -13,16 +17,33 @@ import flash.text.TextLineMetrics;
|
||||
public class ImageUtil
|
||||
{
|
||||
/**
|
||||
* Create a Shape that will display an error message of the specified
|
||||
* dimensions.
|
||||
* Create a DisplayObject that will display an error message
|
||||
* of the specified dimensions.
|
||||
*/
|
||||
public static function createErrorImage (width :int, height :int) :Shape
|
||||
public static function createErrorImage (width :int, height :int)
|
||||
:DisplayObject
|
||||
{
|
||||
var shape :Shape = new Shape();
|
||||
shape.graphics.beginBitmapFill(createErrorBitmap());
|
||||
shape.graphics.drawRect(0, 0, width, height);
|
||||
shape.graphics.endFill();
|
||||
return shape;
|
||||
|
||||
/*
|
||||
// Alternate implementation that creates an actual Bitmap object
|
||||
var src :BitmapData = createErrorBitmap();
|
||||
var data :BitmapData = new BitmapData(width, height, false);
|
||||
data.draw(src);
|
||||
var rect :Rectangle = new Rectangle(0, 0, src.width, src.height);
|
||||
for (var xx :int = 0; xx < width; xx += src.width) {
|
||||
for (var yy :int = 0; yy < height; yy += src.height) {
|
||||
if (xx != 0 || yy != 0) {
|
||||
data.copyPixels(data, rect, new Point(xx, yy));
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Bitmap(data);
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user