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
To be precise: languages that are spoken in this country more
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
lng <n> Longitude of the center of the country's bounding box
name <s> Name of the country

View file

@ -15,6 +15,8 @@ Ox.load.Image = function(options, callback) {
width <n> Width in px
image <n> Height in px
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() {
@ -328,11 +330,11 @@ Ox.load.Image = function(options, callback) {
deflate <b|true> If true, encode the string with deflate
mode <n|0> Encoding mode
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
(mode 0) significant bit. If mode is between 1 and 255, the
string will be encoded bitwise into all bits per byte that, in
mode, are set to 1.
string will be encoded bitwise into all bits per RGB byte that,
in mode, are set to 1.
@*/
that.encode = function(str) {
var callback = arguments[arguments.length - 1],