summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2012-11-20 12:35:32 +0100
committerportix <none@none>2012-11-20 12:35:32 +0100
commit9cf59535dc1e9cc37237a7ddfefd164a444a2470 (patch)
tree6dfb6425e65d264702bc9009c552054ace57d7fe /api
parentbd66e5045613123ee067f829185e3c15353470d3 (diff)
downloaddwb-9cf59535dc1e9cc37237a7ddfefd164a444a2470.zip
Implementing wv.toPng; set base-uri to HOME in sp_load
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.740
-rw-r--r--api/jsapi.7.txt17
-rw-r--r--api/jsapi.txt25
3 files changed, 80 insertions, 2 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index aed9715e..0994d865 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2,12 +2,12 @@
.\" Title: dwb-js
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 11/19/2012
+.\" Date: 11/20/2012
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWB\-JS" "7" "11/19/2012" "\ \&" "\ \&"
+.TH "DWB\-JS" "7" "11/20/2012" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -1296,6 +1296,42 @@ true if the uri is loaded
.nr an-break-flag 1
.br
.ps +1
+\fBNumber wv.toPng(String filename, [Number width, Number height], [Boolean keepAspect])\fR
+.RS 4
+.sp
+Renders a webview to a png file\&.
+.PP
+\fIfilename\fR
+.RS 4
+The filename for the png\&.
+.RE
+.PP
+\fIwidth\fR
+.RS 4
+The width of the png, if width is < 0 and height is > 0 the image has the same aspect ratio as the original webview, optional\&.
+.RE
+.PP
+\fIheight\fR
+.RS 4
+The height of the png, if height is < 0 and width is > 0 the image will have the same aspect ratio as the original webview, optional, mandatory if width is set\&.
+.RE
+.PP
+\fIkeepAspect\fR
+.RS 4
+Whether to keep the aspect ratio, if set to true the new image will have the same aspect ratio as the original webview, width and height are taken as maximum sizes and must both be > 0, optional\&.
+.RE
+.PP
+\fIreturns\fR
+.RS 4
+A cairo_status_t (0 on success) or \-1 if an error occured\&.
+.RE
+.RE
+.sp
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
\fBvoid wv.reload(void)\fR
.RS 4
.sp
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 0bfa830f..10330aef 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -598,6 +598,23 @@ changes, return true to stop the emission, optional
_returns_;; true if the uri is loaded
****
+==== Number wv.toPng(String filename, [Number width, Number height], [Boolean keepAspect])
+****
+
+Renders a webview to a png file.
+
+_filename_;; The filename for the png.
+_width_;; The width of the png, if width is < 0 and height is > 0 the image has
+the same aspect ratio as the original webview, optional.
+_height_;; The height of the png, if height is < 0 and width is > 0 the image
+will have the same aspect ratio as the original webview, optional, mandatory
+if width is set.
+_keepAspect_;; Whether to keep the aspect ratio, if set to true the new
+image will have the same aspect ratio as the original webview, width and
+height are taken as maximum sizes and must both be > 0, optional.
+_returns_;; A cairo_status_t (0 on success) or -1 if an error occured.
+****
+
==== void wv.reload(void)
****
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 67007c5f..7ea7f182 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -1175,6 +1175,31 @@ void wv.reload(void)
Reload a webview
****
+****
+[float]
+==== *toPng()* ====
+
+[source,javascript]
+----
+Number wv.toPng(String filename, [Number width, Number height], [Boolean keepAspect])
+----
+
+Renders a webview to a png file.
+
+_filename_;; The filename for the png.
+_width_;; The width of the png, if width is < 0 and height is > 0 the image has
+the same aspect ratio as the original webview, optional.
+_height_;; The height of the png, if height is < 0 and width is > 0 the image
+will have the same aspect ratio as the original webview, optional, mandatory
+if width is set.
+_keepAspect_;; Whether to keep the ascpect ratio, if the set to true the new
+image will have the same aspect ratio as the original webview, width and
+height are taken as maximum sizes and must both be > 0, optional.
+_returns_;; A cairo_status_t (0 on success) or -1 if an error occured.
+****
+
+
+
====
[float]