Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 1.5

COLUMN

Welcome to the REALbasic Developer Magazine Beginner's Corner!

Issue: 1.5 (April/May 2003)
Author: Thomas J. Cunningham
Author Bio: Thomas is a hobbyist programmer and enjoys sharing the RB loving with others... His online RB Beginner tutorial has had over 17,000 hits!
Article Description: No description available.
Article Length (in bytes): 9,533
Starting Page Number: 28
Article Number: 1514
Resource File(s):

Download Icon 1514.zip Updated: 2013-03-11 19:07:56

Related Link(s): None

Excerpt of article text...

As promised, this month's column will continue with basic drawing concepts in RB. Last month we discussed pixels, resolution, color depth, and we explored a few methods of the Graphics class.

Graphics As A Layer

When I first started using RB, I wanted to be able to draw things using my computer. Sounds easy, but drawing to a computer can be a bit confusing, so let me introduce a concept that helped me get over the hump with drawing in RB: a bit of semantics. Remember that we are discussing the Graphics class.

When we speak of a graphics property, it is usefule to substitute the word "layer" for the word "property." We draw things to a graphics layer. Think of this layer as a thin sheet of clear plastic. Some classes come with this plastic sheet. A window, for example, has a graphics layer: our thin sheet of plastic to which we can draw. Most classes do not have a graphics property that we can use. A StaticText class, for example, does not have a graphics property (well, it does, since it is drawn to our screen, but RB does not give us access to its property).

Okay, so some classes have a graphics layer where we can do some drawing. In addition, if a class has a graphics layer, it also has a Paint Event associated with it. Remember, RB is an event-driven environment, so we need to balance our understanding between both classes and the events it responds to.

Paint Event

...End of Excerpt. Please purchase the magazine to read the full article.