1
0
Fork 0
forked from 0x2620/oxjs

in documentation use foo, not <code>foo</code>

This commit is contained in:
rolux 2012-06-02 13:06:44 +02:00
commit 73fa856900
16 changed files with 89 additions and 105 deletions

View file

@ -6,8 +6,8 @@ Ox.load.Image = function(options, callback) {
/*@
Ox.Image <f> Generic image object
To render the image as an image element, use its <code>src()</code>
method, to render it as a canvas, use its <code>canvas</code> property.
To render the image as an image element, use its `src()` method, to
render it as a canvas, use its `canvas` property.
(src, callback) -> <u> undefined
(width, height, callback) -> <u> undefined
(width, height, background, callback) -> <u> undefined
@ -187,7 +187,7 @@ Ox.load.Image = function(options, callback) {
/*@
drawCircle <f> Draws a circle
(point, radius, options) -> <o> The image object
point <[n]> Center (<code>[x, y]</code>)
point <[n]> Center (`[x, y]`)
radius <n> Radius in px
options <o> Options
color <s|'rgb(0, 0, 0)'> CSS color
@ -206,7 +206,7 @@ Ox.load.Image = function(options, callback) {
/*@
drawLine <f> Draws a line
(points, options) -> <o> The image object
points <[a]> End points (<code>[[x1, y1], [x2, y2]]</code>)
points <[a]> End points (`[[x1, y1], [x2, y2]]`)
options <o> Options
color <s|'rgb(0, 0, 0)'> CSS color
width <n|1> Line width in px
@ -223,7 +223,7 @@ Ox.load.Image = function(options, callback) {
/*@
drawPath <f> Draws a path
(points, options) -> <o> The image object
points <[a]> Points (<code>[[x1, y2], [x2, y2], ...]</code>)
points <[a]> Points (`[[x1, y2], [x2, y2], ...]`)
options <o> Options
color <s|'rgb(0, 0, 0)'> CSS color
fill <s|'rgba(0, 0, 0, 0)'> CSS color
@ -245,8 +245,8 @@ Ox.load.Image = function(options, callback) {
/*@
drawRectangle <f> Draws a rectangle
(point, size, options) -> <o> The image object
point <[n]> Top left corner (<code>[x, y]</code>)
size <[n]> Width and height in px (<code>[w, h]</code>)
point <[n]> Top left corner (`[x, y]`)
size <[n]> Width and height in px (`[w, h]`)
options <o> Options
color <s|'rgb(0, 0, 0)'> CSS color
fill <s|'rgba(0, 0, 0, 0)'> CSS color
@ -263,7 +263,7 @@ Ox.load.Image = function(options, callback) {
drawText <f> Draws text
(text, point, options) -> <o> The image object
text <s> Text
point <[n]> Top left corner (<code>[x, y]</code>)
point <[n]> Top left corner (`[x, y]`)
options <o> Options
color <s|'rgb(0, 0, 0)'> CSS color
font <s|'10px sans-serif'> CSS font
@ -316,9 +316,9 @@ Ox.load.Image = function(options, callback) {
For most purposes, deflate and mode should be omitted, since the
defaults make the existence of the message harder to detect. A valid
use case for deflate and mode would be to first encode a more easily
detected decoy string, and only then the secret string: <code>
image.encode(decoy, false, 1, function(image) { image.encode(secret,
-1, callback); })</code>.
detected decoy string, and only then the secret string:
`image.encode(decoy, false, 1, function(image) {
image.encode(secret, -1, callback); })`.
(str, callback) -> <o> The image object (unmodified)
(str, deflate, callback) -> <o> The image object (unmodified)
(str, mode, callback) -> <o> The image object (unmodified)