Hi Thomas,

These look very cool.

Just one small suggestion based on the example code on your site:

> Dim myText As CGText
>   myText = New CGText(self, 100,50, self.Width, self.Height)
>   myText.SetText "REALbasic 2K7"
>   myText.SetFontName "Impact"
>   myText.SetFontSize self.Height / 10
>   myText.SetCharacterSpacing 4
>   myText.SetDrawingMode "TextFillStroke"
>   myText.SetFillColor &c008000
>   myText.SetFillAlpha 0.50
>   myText.SetStrokeColor &c004080
>   myText.SetStrokeAlpha 1.0
>   myText.SetRotation 45
>   myText.SetShadowBlur 0.50
>   myText.SetShadowColor &c008000
>   myText.SetShadowOffset 12, -4
>   myText.Draw()


Why don't you use the assigns keyword in your function definitions.  
This would make your classes much more inline with the rest of the  
native framework.

e.g.
If you change the SetFontName declaration to read

Function FontName(assigns s as string)

then you could just state:    myText.FontName = "Impact"
instead of the current:          myText.SetFontName "Impact"

And I would split the function SetShadowOffset to be ShadowOffsetX 
(assigns n as integer) and ShadowOffsetY(assigns n as integer)

Just seems more natural to me.

Cheers,
Tom


On 24/03/2007, at 6:16 PM, Thomas Cunningham wrote:

> Hi,
>
> I've decided to take a little different approach to my CoreGraphics  
> usage in
> Rb, a new design approach. Instead of extending the Graphics class  
> as my
> previous versions, I am refactoring creating CG Classes. This Beta  
> release
> includes CGLine, CGRectangle, CGText and CGImage. In the Paint()  
> event of a
> Window or Canvas, you instantiate each object then *set* its  
> properties.
>
> A sample project is included with this download. You can see some  
> screen
> shots on the web page. The modules and classes created by me are  
> free to use
> but they are encrypted. This is Mac only.
>
> You can get rotated objects with colored shadows among other  
> features. As
> usual, I'd really like to hear from you if this may help you with a  
> project.
> More details here,
>
> http://www.maui.net/~mauitom/CoreGraphics.html
>
> --
> Thomas C.
> chives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to