View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

funfunfun11

PREV ------ ● TOP ● ------ NEXTUploaded Image: fmrph.jpg


描画メソッドのメモ

とりあえず試してみたものをメモっておきまする。


■Draw Method

これは「Morphic-Support」カテゴリの「FormCanvas」クラスから抜き出してます。
「FormCanvas」クラスを選択して「class」ボタンをクリックすると
「メソッドペイン」に「test1」〜「test3」というExampleがありますので
そこを参考にしたですよ。


point: 座標 color: 色
line: 座標 to: 座標 width: 幅 color: 色
fillColor: color: 色
frameRectangle: 座標 corner: 座標 width: 幅 color: 色
fillRectangle:
frameOval:
fillOvale:
drawString: ' テキスト' at: 座標 font: フォント color: 色


■Color Method

カラーは「Graphics-Primitives」カテゴリの「Color」クラスで
これまた「class」ボタンを押してメソッドカテゴリの「example」を
参考にしてるです。


color: (Color r: 1.0 g: 1.0 b: 1.0)
color: (Color r: 255 g: 255 b: 255 range: 255)
color: (Color r: 1.0 g: 1.0 b: 1.0 alpha: 0.5)
color: Color white

black
gray
red
orange
yellow
blue
green
brown
magenta
cyan
transparent
light
dark



PREV ------ ● TOP ● ------ NEXT







■ MEMO ■

Friday, 9 January 2004, 7:14:15 pm

■全てのExampleを表示する

何処のサイトで見たのか忘れちゃったのですがすべてのExampleを見たいときは
WorkSpaceで以下のコードをDoit!するとリストアップされるです。
---------------------------------------------------
Smalltalk browseAllMethodsInCategory: #examples
---------------------------------------------------
表示されたリストの中のものをひとつ選んでAlt+bでブラウズ
exampleのコードにあるコメントからDoIt !で実行でござる。ぜひお試しあれ。--thoru

Links to this Page