1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549
|
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cogl-Primitives">
<refmeta>
<refentrytitle role="top_of_page" id="cogl-Primitives.top_of_page">Primitives</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>COGL Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Primitives</refname>
<refpurpose>Functions that draw various primitive shapes and
allow for construction of more complex paths.</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv id="cogl-Primitives.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<link linkend="void">void</link> <link linkend="cogl-color">cogl_color</link> (const <link linkend="ClutterColor">ClutterColor</link> *color);
<link linkend="void">void</link> <link linkend="cogl-path-fill">cogl_path_fill</link> (void);
<link linkend="void">void</link> <link linkend="cogl-path-stroke">cogl_path_stroke</link> (void);
<link linkend="void">void</link> <link linkend="cogl-path-move-to">cogl_path_move_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);
<link linkend="void">void</link> <link linkend="cogl-path-close">cogl_path_close</link> (void);
<link linkend="void">void</link> <link linkend="cogl-path-line-to">cogl_path_line_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);
<link linkend="void">void</link> <link linkend="cogl-path-curve-to">cogl_path_curve_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2,
<link linkend="ClutterFixed">ClutterFixed</link> x3,
<link linkend="ClutterFixed">ClutterFixed</link> y3);
<link linkend="void">void</link> <link linkend="cogl-path-arc">cogl_path_arc</link> (<link linkend="ClutterFixed">ClutterFixed</link> center_x,
<link linkend="ClutterFixed">ClutterFixed</link> center_y,
<link linkend="ClutterFixed">ClutterFixed</link> radius_x,
<link linkend="ClutterFixed">ClutterFixed</link> radius_y,
<link linkend="ClutterAngle">ClutterAngle</link> angle_1,
<link linkend="ClutterAngle">ClutterAngle</link> angle_2);
<link linkend="void">void</link> <link linkend="cogl-path-rel-move-to">cogl_path_rel_move_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);
<link linkend="void">void</link> <link linkend="cogl-path-rel-line-to">cogl_path_rel_line_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);
<link linkend="void">void</link> <link linkend="cogl-path-rel-curve-to">cogl_path_rel_curve_to</link> (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2,
<link linkend="ClutterFixed">ClutterFixed</link> x3,
<link linkend="ClutterFixed">ClutterFixed</link> y3);
<link linkend="void">void</link> <link linkend="cogl-path-line">cogl_path_line</link> (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2);
<link linkend="void">void</link> <link linkend="cogl-path-polyline">cogl_path_polyline</link> (<link linkend="ClutterFixed">ClutterFixed</link> *coords,
<link linkend="gint">gint</link> num_points);
<link linkend="void">void</link> <link linkend="cogl-path-polygon">cogl_path_polygon</link> (<link linkend="ClutterFixed">ClutterFixed</link> *coords,
<link linkend="gint">gint</link> num_points);
<link linkend="void">void</link> <link linkend="cogl-path-rectangle">cogl_path_rectangle</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height);
<link linkend="void">void</link> <link linkend="cogl-path-round-rectangle">cogl_path_round_rectangle</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height,
<link linkend="ClutterFixed">ClutterFixed</link> radius,
<link linkend="ClutterAngle">ClutterAngle</link> arc_step);
<link linkend="void">void</link> <link linkend="cogl-path-ellipse">cogl_path_ellipse</link> (<link linkend="ClutterFixed">ClutterFixed</link> center_x,
<link linkend="ClutterFixed">ClutterFixed</link> center_y,
<link linkend="ClutterFixed">ClutterFixed</link> radius_x,
<link linkend="ClutterFixed">ClutterFixed</link> radius_y);
<link linkend="void">void</link> <link linkend="cogl-rectangle">cogl_rectangle</link> (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guint">guint</link> width,
<link linkend="guint">guint</link> height);
<link linkend="void">void</link> <link linkend="cogl-rectanglex">cogl_rectanglex</link> (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height);
</synopsis>
</refsynopsisdiv>
<refsect1 id="cogl-Primitives.description" role="desc">
<title role="desc.title">Description</title>
<para>
There are three levels on which drawing with cogl can be used. The
highest level functions construct various simple primitive shapes
to be either filled or stroked. Using a lower-level set of functions
more complex and arbitrary paths can be constructed by concatenating
straight line, bezier curve and arc segments. Additionally there
are utility functions that draw the most common primitives - rectangles
and trapezoids - in a maximaly optimized fashion.
</para>
<para>
When constructing arbitrary paths, the current pen location is
initialized using the move_to command. The subsequent path segments
implicitly use the last pen location as their first vertex and move
the pen location to the last vertex they produce at the end. Also
there are special versions of functions that allow specifying the
vertices of the path segments relative to the last pen location
rather then in the absolute coordinates.</para>
<para>
</para>
</refsect1>
<refsect1 id="cogl-Primitives.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="cogl-color" role="function">
<title>cogl_color ()</title>
<indexterm zone="cogl-color"><primary>cogl_color</primary></indexterm><programlisting><link linkend="void">void</link> cogl_color (const <link linkend="ClutterColor">ClutterColor</link> *color);</programlisting>
<para>
Changes the color of cogl's current paint, which is used for filling and stroking
primitives.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>color</parameter> :</term>
<listitem><simpara> new current <parameter>ClutterColor</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-fill" role="function">
<title>cogl_path_fill ()</title>
<indexterm zone="cogl-path-fill"><primary>cogl_path_fill</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_fill (void);</programlisting>
<para>
Fills the constructed shape using the current drawing color.</para>
<para>
</para></refsect2>
<refsect2 id="cogl-path-stroke" role="function">
<title>cogl_path_stroke ()</title>
<indexterm zone="cogl-path-stroke"><primary>cogl_path_stroke</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_stroke (void);</programlisting>
<para>
Strokes the constructed shape using the current drawing color
and a width of 1 pixel (regardless of the current transformation
matrix).</para>
<para>
</para></refsect2>
<refsect2 id="cogl-path-move-to" role="function">
<title>cogl_path_move_to ()</title>
<indexterm zone="cogl-path-move-to"><primary>cogl_path_move_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_move_to (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);</programlisting>
<para>
Clears the previously constructed shape and begins a new path
contour by moving the pen to the given coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the pen location to move to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the pen location to move to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-close" role="function">
<title>cogl_path_close ()</title>
<indexterm zone="cogl-path-close"><primary>cogl_path_close</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_close (void);</programlisting>
<para>
Closes the path being constructed by adding a straight line segment
to it that ends at the first vertex of the path.</para>
<para>
</para></refsect2>
<refsect2 id="cogl-path-line-to" role="function">
<title>cogl_path_line_to ()</title>
<indexterm zone="cogl-path-line-to"><primary>cogl_path_line_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_line_to (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);</programlisting>
<para>
Adds a straight line segment to the current path that ends at the
given coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the end line vertex
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the end line vertex
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-curve-to" role="function">
<title>cogl_path_curve_to ()</title>
<indexterm zone="cogl-path-curve-to"><primary>cogl_path_curve_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_curve_to (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2,
<link linkend="ClutterFixed">ClutterFixed</link> x3,
<link linkend="ClutterFixed">ClutterFixed</link> y3);</programlisting>
<para>
Adds a cubic bezier curve segment to the current path with the given
second, third and fourth control points and using current pen location
as the first control point.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x1</parameter> :</term>
<listitem><simpara> X coordinate of the second bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter> :</term>
<listitem><simpara> Y coordinate of the second bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter> :</term>
<listitem><simpara> X coordinate of the third bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter> :</term>
<listitem><simpara> Y coordinate of the third bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x3</parameter> :</term>
<listitem><simpara> X coordinate of the fourth bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y3</parameter> :</term>
<listitem><simpara> Y coordinate of the fourth bezier control point
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-arc" role="function">
<title>cogl_path_arc ()</title>
<indexterm zone="cogl-path-arc"><primary>cogl_path_arc</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_arc (<link linkend="ClutterFixed">ClutterFixed</link> center_x,
<link linkend="ClutterFixed">ClutterFixed</link> center_y,
<link linkend="ClutterFixed">ClutterFixed</link> radius_x,
<link linkend="ClutterFixed">ClutterFixed</link> radius_y,
<link linkend="ClutterAngle">ClutterAngle</link> angle_1,
<link linkend="ClutterAngle">ClutterAngle</link> angle_2);</programlisting>
<para>
Adds an elliptical arc segment to the current path. A straight line
segment will link the current pen location with the first vertex
of the arc. If you perform a move_to to the arcs start just before
drawing it you create a free standing arc.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>center_x</parameter> :</term>
<listitem><simpara> X coordinate of the elliptical arc center
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>center_y</parameter> :</term>
<listitem><simpara> Y coordinate of the elliptical arc center
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius_x</parameter> :</term>
<listitem><simpara> X radius of the elliptical arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius_y</parameter> :</term>
<listitem><simpara> Y radious of the elliptical arc
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle_1</parameter> :</term>
<listitem><simpara> Angle in the unit-circle at which the arc begin
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle_2</parameter> :</term>
<listitem><simpara> Angle in the unit-circle at which the arc ends
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-rel-move-to" role="function">
<title>cogl_path_rel_move_to ()</title>
<indexterm zone="cogl-path-rel-move-to"><primary>cogl_path_rel_move_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_rel_move_to (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);</programlisting>
<para>
Clears the previously constructed shape and begins a new path
contour by moving the pen to the given coordinates relative
to the current pen location.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X offset from the current pen location to move the pen to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y offset from the current pen location to move the pen to.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-rel-line-to" role="function">
<title>cogl_path_rel_line_to ()</title>
<indexterm zone="cogl-path-rel-line-to"><primary>cogl_path_rel_line_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_rel_line_to (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y);</programlisting>
<para>
Adds a straight line segment to the current path that ends at the
given coordinates relative to the current pen location.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X offset from the current pen location of the end line vertex
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y offset from the current pen location of the end line vertex
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-rel-curve-to" role="function">
<title>cogl_path_rel_curve_to ()</title>
<indexterm zone="cogl-path-rel-curve-to"><primary>cogl_path_rel_curve_to</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_rel_curve_to (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2,
<link linkend="ClutterFixed">ClutterFixed</link> x3,
<link linkend="ClutterFixed">ClutterFixed</link> y3);</programlisting>
<para>
Adds a cubic bezier curve segment to the current path with the given
second, third and fourth control points and using current pen location
as the first control point. The given coordinates are relative to the
current pen location.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x1</parameter> :</term>
<listitem><simpara> X coordinate of the second bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter> :</term>
<listitem><simpara> Y coordinate of the second bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter> :</term>
<listitem><simpara> X coordinate of the third bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter> :</term>
<listitem><simpara> Y coordinate of the third bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x3</parameter> :</term>
<listitem><simpara> X coordinate of the fourth bezier control point
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y3</parameter> :</term>
<listitem><simpara> Y coordinate of the fourth bezier control point
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-line" role="function">
<title>cogl_path_line ()</title>
<indexterm zone="cogl-path-line"><primary>cogl_path_line</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_line (<link linkend="ClutterFixed">ClutterFixed</link> x1,
<link linkend="ClutterFixed">ClutterFixed</link> y1,
<link linkend="ClutterFixed">ClutterFixed</link> x2,
<link linkend="ClutterFixed">ClutterFixed</link> y2);</programlisting>
<para>
Clears the previously constructed shape and constructs a straight
line shape start and ending at the given coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x1</parameter> :</term>
<listitem><simpara> X coordinate of the start line vertex
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y1</parameter> :</term>
<listitem><simpara> Y coordinate of the start line vertex
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x2</parameter> :</term>
<listitem><simpara> X coordinate of the end line vertex
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y2</parameter> :</term>
<listitem><simpara> Y coordinate of the end line vertex
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-polyline" role="function">
<title>cogl_path_polyline ()</title>
<indexterm zone="cogl-path-polyline"><primary>cogl_path_polyline</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_polyline (<link linkend="ClutterFixed">ClutterFixed</link> *coords,
<link linkend="gint">gint</link> num_points);</programlisting>
<para>
Clears the previously constructed shape and constructs a series of straight
line segments, starting from the first given vertex coordinate. Each
subsequent segment stars where the previous one ended and ends at the next
given vertex coordinate.
</para>
<para>
The coords array must contain 2 * num_points values. The first value
represents the X coordinate of the first vertex, the second value
represents the Y coordinate of the first vertex, continuing in the same
fashion for the rest of the vertices. (num_points - 1) segments will
be constructed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>coords</parameter> :</term>
<listitem><simpara> A pointer to the first element of an array of fixed-point
values that specify the vertex coordinates.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_points</parameter> :</term>
<listitem><simpara> The total number of vertices.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-polygon" role="function">
<title>cogl_path_polygon ()</title>
<indexterm zone="cogl-path-polygon"><primary>cogl_path_polygon</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_polygon (<link linkend="ClutterFixed">ClutterFixed</link> *coords,
<link linkend="gint">gint</link> num_points);</programlisting>
<para>
Clears the previously constructed shape and constructs a polygonal
shape of the given number of vertices.
</para>
<para>
The coords array must contain 2 * num_points values. The first value
represents the X coordinate of the first vertex, the second value
represents the Y coordinate of the first vertex, continuing in the same
fashion for the rest of the vertices.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>coords</parameter> :</term>
<listitem><simpara> A pointer to the first element of an array of fixed-point
values that specify the vertex coordinates.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>num_points</parameter> :</term>
<listitem><simpara> The total number of vertices.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-rectangle" role="function">
<title>cogl_path_rectangle ()</title>
<indexterm zone="cogl-path-rectangle"><primary>cogl_path_rectangle</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_rectangle (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height);</programlisting>
<para>
Clears the previously constructed shape and constructs a rectangular
shape at the given coordinates.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the top-left corner.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the top-left corner.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara> Rectangle width.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara> Rectangle height.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-round-rectangle" role="function">
<title>cogl_path_round_rectangle ()</title>
<indexterm zone="cogl-path-round-rectangle"><primary>cogl_path_round_rectangle</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_round_rectangle (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height,
<link linkend="ClutterFixed">ClutterFixed</link> radius,
<link linkend="ClutterAngle">ClutterAngle</link> arc_step);</programlisting>
<para>
Clears the previously constructed shape and constructs a rectangular
shape with rounded corners.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara> Width of the rectangle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara> Height of the rectangle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius</parameter> :</term>
<listitem><simpara> Radius of the corner arcs.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arc_step</parameter> :</term>
<listitem><simpara> Angle increment resolution for subdivision of
the corner arcs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-path-ellipse" role="function">
<title>cogl_path_ellipse ()</title>
<indexterm zone="cogl-path-ellipse"><primary>cogl_path_ellipse</primary></indexterm><programlisting><link linkend="void">void</link> cogl_path_ellipse (<link linkend="ClutterFixed">ClutterFixed</link> center_x,
<link linkend="ClutterFixed">ClutterFixed</link> center_y,
<link linkend="ClutterFixed">ClutterFixed</link> radius_x,
<link linkend="ClutterFixed">ClutterFixed</link> radius_y);</programlisting>
<para>
Clears the previously constructed shape and constructs an ellipse
shape.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>center_x</parameter> :</term>
<listitem><simpara> X coordinate of the ellipse center
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>center_y</parameter> :</term>
<listitem><simpara> Y coordinate of the ellipse center
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius_x</parameter> :</term>
<listitem><simpara> X radius of the ellipse
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>radius_y</parameter> :</term>
<listitem><simpara> Y radius of the ellipse
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-rectangle" role="function">
<title>cogl_rectangle ()</title>
<indexterm zone="cogl-rectangle"><primary>cogl_rectangle</primary></indexterm><programlisting><link linkend="void">void</link> cogl_rectangle (<link linkend="gint">gint</link> x,
<link linkend="gint">gint</link> y,
<link linkend="guint">guint</link> width,
<link linkend="guint">guint</link> height);</programlisting>
<para>
Fills a rectangle at the given coordinates with the current
drawing color in a highly optimizied fashion.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara> Width of the rectangle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara> Height of the rectangle
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="cogl-rectanglex" role="function">
<title>cogl_rectanglex ()</title>
<indexterm zone="cogl-rectanglex"><primary>cogl_rectanglex</primary></indexterm><programlisting><link linkend="void">void</link> cogl_rectanglex (<link linkend="ClutterFixed">ClutterFixed</link> x,
<link linkend="ClutterFixed">ClutterFixed</link> y,
<link linkend="ClutterFixed">ClutterFixed</link> width,
<link linkend="ClutterFixed">ClutterFixed</link> height);</programlisting>
<para>
A fixed-point version of cogl_fast_fill_rectangle.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter> :</term>
<listitem><simpara> X coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter> :</term>
<listitem><simpara> Y coordinate of the top-left corner
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>width</parameter> :</term>
<listitem><simpara> Width of the rectangle
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>height</parameter> :</term>
<listitem><simpara> Height of the rectangle
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|