Browse files

Indexing for Drawing

  • Loading branch information...
kthakore committed Jul 26, 2011
1 parent f9166ca commit 48fdb0e6c51682dc07dff82ec8e6e510640c310f
Showing with 18 additions and 4 deletions.
  1. +18 −2 dist/SDL_Manual.html
  2. BIN dist/SDL_Manual.pdf
  3. +0 −2 src/02-drawing.pod
@@ -370,11 +370,11 @@ <h4>Rectangular Parameters</h4>
<pre><code> my $rect = [20, 20, 40, 40];</code></pre>
-<p><a name="Draw"> </p>
-<p><a name="Draw"> </p>
<p>Need to document what the magnitude of the color and transparency values
@@ -418,6 +418,8 @@ <h4>Color</h4>
<h5>NOTE: Depth of Surface</h5>
<p>The color depth of the surface--how many bits are available to describe
colors--is a property of the relevant <code>SDLx::Surface</code> or
<code>SDLx::App</code>. Set it in its constructor:</p>
@@ -431,6 +433,8 @@ <h5>NOTE: Depth of Surface</h5>
<p>All <code>SDLx::Surface</code>s are collections of pixels. You can read
from and write to these pixels by treating the surface as an array
@@ -454,6 +458,8 @@ <h3>Primitives</h3>
<p>A line is a series of contiguous pixels between two points. The
<code>draw_line</code> method causes SDL to draw a line to a surface:</p>
@@ -509,6 +515,8 @@ <h4>Circles</h4>
<h3>Drawing with Primitives</h3>
<p>It's easy to combine several primitives to draw an interesting
@@ -557,12 +565,16 @@ <h3>Drawing with Primitives</h3>
<h2>Drawing on Multiple Surfaces</h2>
<p>The examples so far have drawn on only a single surface, the display.
SDL makes it possible to write on multiple surfaces. These other surfaces
exist only in memory until you draw them to the display.</p>
<h3>Creating Surfaces</h3>
<p>There are several ways to create an <code>SDLx::Surface</code> for use.
The most common is to create one manually with a constructor call:</p>
@@ -576,6 +588,8 @@ <h3>Creating Surfaces</h3>
<pre><code> $surface = SDL::Image::load( &#39;picture.png&#39; );</code></pre>
<p>In the event that the desired <code>SDL_image</code> library is
unavailable, you can fallback to the built-in support for the
<code>.bmp</code> format.</p>
@@ -595,6 +609,8 @@ <h2>Lots of Flowers but One Seed</h2>
useful for moving images. Here's a revised example using
<code>SDLx::Sprite</code> for flowers:</p>
<pre><code> use strict;
use warnings;
use SDL;
Binary file not shown.
@@ -58,12 +58,10 @@ height:
my $rect = [20, 20, 40, 40];
X<Rectangular Parameters>
=head3 Color
X<Color Parameters>
=for editor

0 comments on commit 48fdb0e

Please sign in to comment.