LinesWidth(取得メソッド)

曲線をプロットする線の幅を取得します。

int  LinesWidth()

戻り値

線の幅

LinesWidth(設定メソッド)

曲線をプロットする線の幅を設定します。

void  LinesWidth(
  const int  width      // 線の幅
  )

パラメータ

[in] 曲線をプロットする線の幅

例:

graphics_width

線幅は次のコードを使用して変更されました。

//+------------------------------------------------------------------+
//|                                                CandleGraphic.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Graphics\Graphic.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
 {
  double x[]= { -100,-40,-10,20,30,40,50,60,70,80,120 };
  double y[]= { -5,4,-10,23,17,18,-9,13,17,4,9 };
//--- グラフィックを作成する
  CGraphic graphic;
  if(!graphic.Create(0,"ThickLineGraphic",0,30,30,780,380))
    {
     graphic.Attach(0,"ThickLineGraphic");
    }
//--- 曲線を作成する
  CCurve *curve=graphic.CurveAdd(x,y,CURVE_LINES);
//--- 曲線のプロパティを設定する
  curve.LinesSmooth(true);
  curve.LinesStyle(STYLE_DASH);
  curve.LinesEndStyle(LINE_END_ROUND);
  curve.LinesWidth(10);
//--- plot
  graphic.CurvePlotAll();
  graphic.Update();
 }