update documentation, add test

This commit is contained in:
rolux 2012-05-27 21:38:02 +02:00
parent 7240cf2c38
commit 5204ef14b4
2 changed files with 6 additions and 4 deletions

View file

@ -45,7 +45,7 @@ Ox.load.Geo = function(options, callback) {
languages <[s]> Array of languages spoken in this country languages <[s]> Array of languages spoken in this country
To be precise: languages that are spoken in this country more To be precise: languages that are spoken in this country more
than in any other, i.e. each language only appears once. This than in any other, i.e. each language only appears once. This
can be useful if you need flag icons for languages. can be used to map languages to flag icons.
lat <n> Latitude of the center of the country's bounding box lat <n> Latitude of the center of the country's bounding box
lng <n> Longitude of the center of the country's bounding box lng <n> Longitude of the center of the country's bounding box
name <s> Name of the country name <s> Name of the country

View file

@ -15,6 +15,8 @@ Ox.load.Image = function(options, callback) {
width <n> Width in px width <n> Width in px
image <n> Height in px image <n> Height in px
background <[n]> Background color (RGB or RGBA) background <[n]> Background color (RGB or RGBA)
> Ox.Image(Ox.UI.PATH + 'themes/classic/png/icon16.png', function(i) { i.encode('foo', function(i) { i.decode(function(s) { Ox.test(s, 'foo') })})})
undefined
@*/ @*/
Ox.Image = function() { Ox.Image = function() {
@ -328,11 +330,11 @@ Ox.load.Image = function(options, callback) {
deflate <b|true> If true, encode the string with deflate deflate <b|true> If true, encode the string with deflate
mode <n|0> Encoding mode mode <n|0> Encoding mode
If mode is between -7 and 0, the string will be encoded one bit If mode is between -7 and 0, the string will be encoded one bit
per byte, as the number of bits within that byte set to 1, per RGB byte, as the number of bits within that byte set to 1,
modulo 2, by flipping, if necessary, the most (mode -7) to least modulo 2, by flipping, if necessary, the most (mode -7) to least
(mode 0) significant bit. If mode is between 1 and 255, the (mode 0) significant bit. If mode is between 1 and 255, the
string will be encoded bitwise into all bits per byte that, in string will be encoded bitwise into all bits per RGB byte that,
mode, are set to 1. in mode, are set to 1.
@*/ @*/
that.encode = function(str) { that.encode = function(str) {
var callback = arguments[arguments.length - 1], var callback = arguments[arguments.length - 1],