Skip to content

Commit 48fdb0e

Browse files
committed
Indexing for Drawing
1 parent f9166ca commit 48fdb0e

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

dist/SDL_Manual.html

+18-2
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ <h4>Rectangular Parameters</h4>
370370

371371
<pre><code> my $rect = [20, 20, 40, 40];</code></pre>
372372

373-
<p><a name="Draw"> </p>
373+
<p></p>
374374

375375
<h4>Color</h4>
376376

377-
<p><a name="Draw"> </p>
377+
<p></p>
378378

379379
<p>Need to document what the magnitude of the color and transparency values
380380
mean.</p>
@@ -418,6 +418,8 @@ <h4>Color</h4>
418418

419419
<h5>NOTE: Depth of Surface</h5>
420420

421+
<p></p>
422+
421423
<p>The color depth of the surface--how many bits are available to describe
422424
colors--is a property of the relevant <code>SDLx::Surface</code> or
423425
<code>SDLx::App</code>. Set it in its constructor:</p>
@@ -431,6 +433,8 @@ <h5>NOTE: Depth of Surface</h5>
431433

432434
<h3>Pixels</h3>
433435

436+
<p></p>
437+
434438
<p>All <code>SDLx::Surface</code>s are collections of pixels. You can read
435439
from and write to these pixels by treating the surface as an array
436440
reference:</p>
@@ -454,6 +458,8 @@ <h3>Primitives</h3>
454458

455459
<h4>Lines</h4>
456460

461+
<p></p>
462+
457463
<p>A line is a series of contiguous pixels between two points. The
458464
<code>draw_line</code> method causes SDL to draw a line to a surface:</p>
459465

@@ -509,6 +515,8 @@ <h4>Circles</h4>
509515

510516
<h3>Drawing with Primitives</h3>
511517

518+
<p></p>
519+
512520
<p>It's easy to combine several primitives to draw an interesting
513521
images.</p>
514522

@@ -557,12 +565,16 @@ <h3>Drawing with Primitives</h3>
557565

558566
<h2>Drawing on Multiple Surfaces</h2>
559567

568+
<p></p>
569+
560570
<p>The examples so far have drawn on only a single surface, the display.
561571
SDL makes it possible to write on multiple surfaces. These other surfaces
562572
exist only in memory until you draw them to the display.</p>
563573

564574
<h3>Creating Surfaces</h3>
565575

576+
<p></p>
577+
566578
<p>There are several ways to create an <code>SDLx::Surface</code> for use.
567579
The most common is to create one manually with a constructor call:</p>
568580

@@ -576,6 +588,8 @@ <h3>Creating Surfaces</h3>
576588

577589
<pre><code> $surface = SDL::Image::load( &#39;picture.png&#39; );</code></pre>
578590

591+
<p></p>
592+
579593
<p>In the event that the desired <code>SDL_image</code> library is
580594
unavailable, you can fallback to the built-in support for the
581595
<code>.bmp</code> format.</p>
@@ -595,6 +609,8 @@ <h2>Lots of Flowers but One Seed</h2>
595609
useful for moving images. Here's a revised example using
596610
<code>SDLx::Sprite</code> for flowers:</p>
597611

612+
<p></p>
613+
598614
<pre><code> use strict;
599615
use warnings;
600616
use SDL;

dist/SDL_Manual.pdf

1.51 KB
Binary file not shown.

src/02-drawing.pod

-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ height:
5858

5959
my $rect = [20, 20, 40, 40];
6060

61-
Z<Draw>
6261
X<Rectangular Parameters>
6362

6463
=head3 Color
6564

66-
Z<Draw>
6765
X<Color Parameters>
6866

6967
=for editor

0 commit comments

Comments
 (0)