making tools build
This commit is contained in:
@@ -50,19 +50,19 @@ class ImageDataUtil
|
|||||||
|
|
||||||
var sourceOffset:Int;
|
var sourceOffset:Int;
|
||||||
|
|
||||||
var sourcePixel:RGBA;
|
var sourcePixel:RGBA = new RGBA();
|
||||||
var mapPixel:RGBA;
|
var mapPixel:RGBA = new RGBA();
|
||||||
var targetPixel:RGBA;
|
var targetPixel:RGBA = new RGBA();
|
||||||
|
|
||||||
var mapPixelX:Float;
|
var mapPixelX:Float;
|
||||||
var mapPixelY:Float;
|
var mapPixelY:Float;
|
||||||
var mapPixelA:Float;
|
var mapPixelA:Float;
|
||||||
|
|
||||||
// for bilinear smoothing
|
// for bilinear smoothing
|
||||||
var s1:RGBA;
|
var s1:RGBA = new RGBA();
|
||||||
var s2:RGBA;
|
var s2:RGBA = new RGBA();
|
||||||
var s3:RGBA;
|
var s3:RGBA = new RGBA();
|
||||||
var s4:RGBA;
|
var s4:RGBA = new RGBA();
|
||||||
|
|
||||||
var mPointXFloor:Int;
|
var mPointXFloor:Int;
|
||||||
var mPointYFloor:Int;
|
var mPointYFloor:Int;
|
||||||
@@ -180,7 +180,7 @@ class ImageDataUtil
|
|||||||
var greenTable = colorMatrix.getGreenTable();
|
var greenTable = colorMatrix.getGreenTable();
|
||||||
var blueTable = colorMatrix.getBlueTable();
|
var blueTable = colorMatrix.getBlueTable();
|
||||||
|
|
||||||
var row, offset, pixel:RGBA;
|
var row, offset, pixel:RGBA = new RGBA();
|
||||||
|
|
||||||
for (y in 0...dataView.height)
|
for (y in 0...dataView.height)
|
||||||
{
|
{
|
||||||
@@ -240,8 +240,8 @@ class ImageDataUtil
|
|||||||
|
|
||||||
var srcPosition,
|
var srcPosition,
|
||||||
destPosition,
|
destPosition,
|
||||||
srcPixel:RGBA,
|
srcPixel:RGBA = new RGBA(),
|
||||||
destPixel:RGBA,
|
destPixel:RGBA = new RGBA(),
|
||||||
value = 0;
|
value = 0;
|
||||||
|
|
||||||
for (y in 0...destView.height)
|
for (y in 0...destView.height)
|
||||||
@@ -329,7 +329,8 @@ class ImageDataUtil
|
|||||||
|
|
||||||
var sourcePosition, destPosition;
|
var sourcePosition, destPosition;
|
||||||
var sourceAlpha, destAlpha, oneMinusSourceAlpha, blendAlpha;
|
var sourceAlpha, destAlpha, oneMinusSourceAlpha, blendAlpha;
|
||||||
var sourcePixel:RGBA, destPixel:RGBA;
|
var sourcePixel:RGBA = new RGBA();
|
||||||
|
var destPixel:RGBA = new RGBA();
|
||||||
|
|
||||||
var sourcePremultiplied = sourceImage.buffer.premultiplied;
|
var sourcePremultiplied = sourceImage.buffer.premultiplied;
|
||||||
var destPremultiplied = image.buffer.premultiplied;
|
var destPremultiplied = image.buffer.premultiplied;
|
||||||
@@ -423,7 +424,7 @@ class ImageDataUtil
|
|||||||
{
|
{
|
||||||
var alphaData = alphaImage.buffer.data;
|
var alphaData = alphaImage.buffer.data;
|
||||||
var alphaFormat = alphaImage.buffer.format;
|
var alphaFormat = alphaImage.buffer.format;
|
||||||
var alphaPosition, alphaPixel:RGBA;
|
var alphaPosition, alphaPixel:RGBA = new RGBA();
|
||||||
|
|
||||||
var alphaView = new ImageDataView(alphaImage,
|
var alphaView = new ImageDataView(alphaImage,
|
||||||
new Rectangle(sourceView.x + (alphaPoint == null ? 0 : alphaPoint.x), sourceView.y + (alphaPoint == null ? 0 : alphaPoint.y),
|
new Rectangle(sourceView.x + (alphaPoint == null ? 0 : alphaPoint.x), sourceView.y + (alphaPoint == null ? 0 : alphaPoint.y),
|
||||||
@@ -571,7 +572,7 @@ class ImageDataUtil
|
|||||||
|
|
||||||
var fillColor:RGBA = color;
|
var fillColor:RGBA = color;
|
||||||
|
|
||||||
var hitColor:RGBA;
|
var hitColor:RGBA = new RGBA();
|
||||||
hitColor.readUInt8(data, ((y + image.offsetY) * (image.buffer.width * 4)) + ((x + image.offsetX) * 4), format, premultiplied);
|
hitColor.readUInt8(data, ((y + image.offsetY) * (image.buffer.width * 4)) + ((x + image.offsetX) * 4), format, premultiplied);
|
||||||
|
|
||||||
if (!image.transparent)
|
if (!image.transparent)
|
||||||
@@ -601,7 +602,7 @@ class ImageDataUtil
|
|||||||
nextPointX,
|
nextPointX,
|
||||||
nextPointY,
|
nextPointY,
|
||||||
nextPointOffset,
|
nextPointOffset,
|
||||||
readColor:RGBA;
|
readColor:RGBA = new RGBA();
|
||||||
|
|
||||||
while (queue.length > 0)
|
while (queue.length > 0)
|
||||||
{
|
{
|
||||||
@@ -809,7 +810,7 @@ class ImageDataUtil
|
|||||||
|
|
||||||
public static function getPixel(image:Image, x:Int, y:Int, format:PixelFormat):Int
|
public static function getPixel(image:Image, x:Int, y:Int, format:PixelFormat):Int
|
||||||
{
|
{
|
||||||
var pixel:RGBA;
|
var pixel:RGBA = new RGBA();
|
||||||
|
|
||||||
pixel.readUInt8(image.buffer.data, (4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4), image.buffer.format,
|
pixel.readUInt8(image.buffer.data, (4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4), image.buffer.format,
|
||||||
image.buffer.premultiplied);
|
image.buffer.premultiplied);
|
||||||
@@ -828,7 +829,7 @@ class ImageDataUtil
|
|||||||
|
|
||||||
public static function getPixel32(image:Image, x:Int, y:Int, format:PixelFormat):Int
|
public static function getPixel32(image:Image, x:Int, y:Int, format:PixelFormat):Int
|
||||||
{
|
{
|
||||||
var pixel:RGBA;
|
var pixel:RGBA = new RGBA();
|
||||||
|
|
||||||
pixel.readUInt8(image.buffer.data, (4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4), image.buffer.format,
|
pixel.readUInt8(image.buffer.data, (4 * (y + image.offsetY) * image.buffer.width + (x + image.offsetX) * 4), image.buffer.format,
|
||||||
image.buffer.premultiplied);
|
image.buffer.premultiplied);
|
||||||
@@ -861,7 +862,10 @@ class ImageDataUtil
|
|||||||
var premultiplied = image.buffer.premultiplied;
|
var premultiplied = image.buffer.premultiplied;
|
||||||
|
|
||||||
var dataView = new ImageDataView(image, rect);
|
var dataView = new ImageDataView(image, rect);
|
||||||
var position, argb:ARGB, bgra:BGRA, pixel:RGBA;
|
var position;
|
||||||
|
var argb:ARGB = new RGBA();
|
||||||
|
var bgra:BGRA = new RGBA();
|
||||||
|
var pixel:RGBA= new RGBA();
|
||||||
var destPosition = 0;
|
var destPosition = 0;
|
||||||
|
|
||||||
for (y in 0...dataView.height)
|
for (y in 0...dataView.height)
|
||||||
@@ -917,7 +921,9 @@ class ImageDataUtil
|
|||||||
var sourcePremultiplied = sourceImage.buffer.premultiplied;
|
var sourcePremultiplied = sourceImage.buffer.premultiplied;
|
||||||
var destPremultiplied = image.buffer.premultiplied;
|
var destPremultiplied = image.buffer.premultiplied;
|
||||||
|
|
||||||
var sourcePosition, destPosition, sourcePixel:RGBA, destPixel:RGBA;
|
var sourcePosition, destPosition;
|
||||||
|
var sourcePixel:RGBA = new RGBA();
|
||||||
|
var destPixel:RGBA = new RGBA();
|
||||||
|
|
||||||
for (y in 0...destView.height)
|
for (y in 0...destView.height)
|
||||||
{
|
{
|
||||||
@@ -958,7 +964,7 @@ class ImageDataUtil
|
|||||||
{
|
{
|
||||||
var format = image.buffer.format;
|
var format = image.buffer.format;
|
||||||
var length = Std.int(data.length / 4);
|
var length = Std.int(data.length / 4);
|
||||||
var pixel:RGBA;
|
var pixel:RGBA = new RGBA();
|
||||||
|
|
||||||
for (i in 0...length)
|
for (i in 0...length)
|
||||||
{
|
{
|
||||||
@@ -1341,8 +1347,8 @@ class ImageDataUtil
|
|||||||
|
|
||||||
var srcPosition,
|
var srcPosition,
|
||||||
destPosition,
|
destPosition,
|
||||||
srcPixel:RGBA,
|
srcPixel:RGBA = new RGBA(),
|
||||||
destPixel:RGBA,
|
destPixel:RGBA = new RGBA(),
|
||||||
pixelMask:UInt,
|
pixelMask:UInt,
|
||||||
test:Bool,
|
test:Bool,
|
||||||
value:Int;
|
value:Int;
|
||||||
@@ -1408,7 +1414,7 @@ class ImageDataUtil
|
|||||||
{
|
{
|
||||||
var format = image.buffer.format;
|
var format = image.buffer.format;
|
||||||
var length = Std.int(data.length / 4);
|
var length = Std.int(data.length / 4);
|
||||||
var pixel:RGBA;
|
var pixel:RGBA = new RGBA();
|
||||||
|
|
||||||
for (i in 0...length)
|
for (i in 0...length)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user