LinesWidth (Get method)

선을 사용하여 곡선을 표시할 때 선 너비 가져오기.

int  LinesWidth()

값 반환

선 너비.

LinesWidth (Set method)

선을 사용하여 곡선을 표시할 때 선 너비를 설정.

void  LinesWidth(
   const int  width      // 선 너비
  \)

매개변수

width

[in]  선을 사용하여 곡선을 표시할 때의 선 너비.

예시:

graphics_width

다음 코드를 사용하여 선 너비가 변경되었습니다:

//+------------------------------------------------------------------+
//|                                                CandleGraphic.mq5 |
//|                         Copyright 2000-2024, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Graphics\Graphic.mqh>
//+------------------------------------------------------------------+
//| 스크립트 프로그램 시작 함수                                    |
//+------------------------------------------------------------------+
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);
//--- 플롯 
   graphic.CurvePlotAll();
   graphic.Update();
  }