API version 1

- ‐

setColorPoint

経過色を設定します。

グラデーションの始点から終点までを0.0~1.0とした場合の位置と色を設定します。

呼出形式一覧

呼出形式

説明

void setColorPoint(number pos, CRS::Common::UI::Color col)

経過色を設定します。

戻り値一覧

戻り値

説明

void

なし

引数一覧

引数

説明

pos

指定位置

col

指定色を保持したColorオブジェクト、またはその他の色指定

例外

識別子

説明

SYS-23:5

メソッドの引数が不正です



使用例 CRSダウンロード

Form Gradient {
   x = 0;
   y = 0;
   width = 800;
   height = 600;

   Chart chart1 {
           x = 10;
           y = 20;
           width = 180;
           height = 100;
           title = "サンプル1(線形)";
           var gra = new Gradient( 1 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "CYAN");
           gra.setLineStartPoint(0.2,0.3) ;
           gra.setLineStopPoint(0.8,0.8) ;
           bgcolor = gra ;
   }
   Chart chart2 {
           x = 210;
           y = 20;
           width = 180;
           height = 100;
           title = "サンプル1(線形)";
           var gra = new Gradient( 1 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "CYAN");
           gra.lineDirection = 3;
           bgcolor = gra ;
           print("type = ",gra.type) ;
   }
   Chart chart3 {
           x = 10;
           y = 130;
           width = 180;
           height = 100;
           title = "サンプル2(放射)";
           var gra = new Gradient( 2 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "RED");
           gra.setRadialFocalPoint(0.3,0.3) ;
           gra.setRadialStartPoint(0.6,0.6) ;
           bgcolor = gra ;
   }
   Chart chart4 {
           x = 210;
           y = 130;
           width = 180;
           height = 100;
           title = "サンプル2(放射)";
           var gra = new Gradient( 2 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "RED");
           gra.radialSize = 0.3 ; # 円の大きさ
           gra.spread = 3 ; #広がり方
           bgcolor = gra ;
           print("type = ",gra.type) ;
   }
   Chart chart5 {
           x = 10;
           y = 240;
           width = 180;
           height = 100;
           title = "サンプル3(円錐)";
           var gra = new Gradient( 3 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "CYAN");
           gra.setConicalStartPoint(0.5,0.5) ;
           bgcolor = gra ;
   }
   Chart chart6 {
           x = 210;
           y = 240;
           width = 180;
           height = 100;
           title = "サンプル3(円錐)";
           var gra = new Gradient( 3 ) ;
           gra.setColorPoint(0.0, "YELLOW");
           gra.setColorPoint(1.0, "CYAN");
           gra.setConicalStartPoint(0.5,0.5) ;
           gra.conicalAngle = 180 ;
           bgcolor = gra ;
           print("type = ",gra.type) ;
   }
}