Changeset 9139

Show
Ignore:
Timestamp:
07/01/08 20:47:55 (5 months ago)
Author:
zumbrunn
Message:

added docs for getPixel, resizeFast and setTransparentPixel methods and added docs for dither and alphaToBitmask parameters to the reduceColors method

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/reference/trunk/coreExtensions/Image.js

    r8694 r9139  
    249249 
    250250/** 
     251 * Returns information about the pixel at x, y.  
     252 * <br /><br /> 
     253 * If the image is indexed, it returns the palette index, otherwise  
     254 * the rgb code of the color is returned. 
     255 *  
     256 * @param {Number} x the x coordinate of the pixel 
     257 * @param {Number} y the y coordinate of the pixel 
     258 * @return the pixel at x, y 
     259 */ 
     260Image.prototype.getPixel(x,y) {}; 
     261 
     262 
     263/** 
    251264 * Retrieves a Java-compatible image object from a Helma image object. 
    252265 * <br /><br /> 
     
    334347 *  
    335348 * @param {Number} colorDepth as Number, value of color depth in an image. 
    336  */ 
    337 Image.prototype.reduceColors = function(colorDepth) {}; 
     349 * @param {Number} dither as Boolean, optional parameter to enable dithering 
     350 * @param {Number} alphaToBitmask as Boolean, optional parameter to use the alpha channel to create a bitmask 
     351 */ 
     352Image.prototype.reduceColors = function(colorDepth, dither, alphaToBitmask) {}; 
    338353 
    339354 
     
    362377 * <img src="http://helma.org/static/images/helma/hawatosch.jpg" /> 
    363378 *  
    364  * @param {Integer} width as Number, new width of the image. 
    365  * @param {Integer} height as Number, new height of the image. 
     379 * @param {Number} width as Number, new width of the image. 
     380 * @param {Number} height as Number, new height of the image. 
     381 * @see Image.resizeFast 
    366382 */ 
    367383Image.prototype.resize = function(width, heigth) {}; 
     384 
     385 
     386/** 
     387 * Resizes the image, using a fast and cheap algorithm. 
     388 *  
     389 * @param {Number} width as Number, new width of the image. 
     390 * @param {Number} height as Number, new height of the image. 
     391 * @see Image.resize 
     392 */ 
     393Image.prototype.resizeFast = function(width, heigth) {}; 
    368394 
    369395 
     
    433459 */ 
    434460Image.prototype.setFont = function(name, style, size) {}; 
     461 
     462 
     463/** 
     464 * Sets the palette index of the transparent color for Images with an IndexColorModel. 
     465 *  
     466 * This can be used together with an Image's getPixel method. 
     467 *  
     468 * @param {Number} index as Number, the index position specifying the transparent color. 
     469 * @see Image.getPixel 
     470 */ 
     471Image.prototype.setTransparentPixel = function(index) {};