Curl
 

Menu
 Chapter.1
 Chapter.2
 Chapter.3
 Chapter.4
 Chapter.5
 Chapter.6
 Chapter.7
 Chapter.8
 Chapter.9
 Chapter.10
 
 
■Ruleの概要

RuleFillクラスを使用すると、興味深い方法で塗りつぶしやくうはく処理を行うことができます。
Ruleは、無限に伸長可能なルーラーを描くことができます。
つまり、水平方向または垂直方向(ただし、同時に両方向は不可)に利用可能な領域全体にわたって、線(または塗りつぶし)を引くことができます。

【水平方向のRuleの例】
{curl 6.0 applet}
{curl-file-attributes character-encoding = "shift-jis"}
{HBox width = 12cm,
{bold Curl入門講座},
{Rule height = 1pt, color="blue"},
{bold curl 3.0 applet版}
}
{HBox width = 12cm,
{text <Chapter 1 > ・Curlの概要},
{Rule height = 1pt, color="blue"},
{text 1}
}
{HBox width = 12cm,
{text <Chapter 2 > ・Curlで簡単なWeb},
{Rule height = 1pt, color="blue"},
{text 12}
}
{HBox width = 12cm,
{text <Chapter 3 > ・Curlでアニメーションをつくってみましょう!},
{Rule height = 1pt, color="blue"},
{text 123}
}



上記の例ではRule を右側の番号に達するまで伸ばしています。
Ruleheight オプションで塗りつぶす高さ(水平方向時)を設定でき、widthオプションで塗りつぶす幅(垂直方向時)を設定できます。
Ruleは、相対的な埋め込み処理を使用しない場合に最適な埋め物です。

Chapter.9(Part.3)へ戻る
Chapter.9(Part.5)へ進む