Permalink
Browse files

Indexing for Drawing

  • Loading branch information...
kthakore
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
View
@@ -370,11 +370,11 @@ <h4>Rectangular Parameters</h4>
<pre><code> my $rect = [20, 20, 40, 40];</code></pre>
-<p><a name="Draw"> </p>
+<p></p>
<h4>Color</h4>
-<p><a name="Draw"> </p>
+<p></p>
<p>Need to document what the magnitude of the color and transparency values
mean.</p>
@@ -418,6 +418,8 @@ <h4>Color</h4>
<h5>NOTE: Depth of Surface</h5>
+<p></p>
+
<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>
<h3>Pixels</h3>
+<p></p>
+
<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
reference:</p>
@@ -454,6 +458,8 @@ <h3>Primitives</h3>
<h4>Lines</h4>
+<p></p>
+
<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></p>
+
<p>It's easy to combine several primitives to draw an interesting
images.</p>
@@ -557,12 +565,16 @@ <h3>Drawing with Primitives</h3>
<h2>Drawing on Multiple Surfaces</h2>
+<p></p>
+
<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></p>
+
<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></p>
+
<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>
+<p></p>
+
<pre><code> use strict;
use warnings;
use SDL;
View
Binary file not shown.
View
@@ -58,12 +58,10 @@ height:
my $rect = [20, 20, 40, 40];
-Z<Draw>
X<Rectangular Parameters>
=head3 Color
-Z<Draw>
X<Color Parameters>
=for editor

0 comments on commit 48fdb0e

Please sign in to comment.