Files
RCBASIC4/doc/doc_files/opencanvas.html
2024-10-24 23:25:02 -04:00

103 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td { border: 1px solid black; } th, td { padding: 10px; }
body { background-color: #064066; color: #FFFFFF; }
a { color: #40bfb8; }
a::before {
content: "---";
font-family: monospace, monospace;
display: inline-block;
margin-right: 6px;
color: #064066;
}
.rc_number { color: #0b9898; }
.rc_string { color: #dd4040; }
.rc_keyword { color: #6084a8; font-weight: bold; }
.rc_comment { color: #6e716e; }
#rc_code { font-family: Consolas,"courier new"; background-color: #2d3335; padding: 2px; font-size: 105%; }
ul, #myUL {
list-style-type: none;
}
#myUL {
margin: 0;
padding: 0;
}
.box {
cursor: pointer;
-webkit-user-select: none; /* Safari 3.1+ */
-moz-user-select: none; /* Firefox 2+ */
-ms-user-select: none; /* IE 10+ */
user-select: none;
}
.box::before {
content: "[+]";
font-family: monospace, monospace;
font-weight: bold;
color: #40bfb8;
display: inline-block;
margin-right: 6px;
}
.box {
font-weight: bold;
color: #40bfb8;
text-decoration: underline;
}
.check-box::before {
content: "[-]";
font-family: monospace, monospace;
font-weight: bold;
//color: dodgerblue;
color: #40bfb8;
}
.nested {
display: none;
}
.active {
display: block;
}
</style>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>OpenCanvas [RCBasic Doc] </title>
</head>
<body>
<p><h1>function OpenCanvas( w, h, viewport_x, viewport_y, viewport_w, viewport_h, mode) </h1></p>
<p>
Returns a canvas for 2D drawing and text rendering
</p>
<ul>
<li>
w, h - The full size of the canvas
</li>
<li>
viewport_x, viewport_y - Where to show the canvas in the window
</li>
<li>
viewport_w, viewport_h - The size of the viewport. For example, a 100 x 100 viewport means that no matter how big the canvas is, only an area of 100 x 100 pixels is displayed.
</li>
<li>
mode - Set this to 0 for a solid canvas and 1 for a color keyed canvas.
</li>
</ul>
<br><p>Related:
<a href="opencanvas3d.html">OpenCanvas3D</a>
<a href="opencanvasspritelayer.html">OpenCanvasSpriteLayer</a>
</p>
<p>
</body>
</html>