PINE LIBRARY
업데이트됨 Vector2DrawTriangle

Library "Vector2DrawTriangle"
Functions to draw a triangle and manipulate its properties.
new(a, b, c, xloc, bg_color, line_color, line_style, line_width)
Draws a triangle with background fill using line prototype.
Parameters:
a: v2 . Vector2 object, in the form `(x, y)`.
b: v2 . Vector2 object, in the form `(x, y)`.
c: v2 . Vector2 object, in the form `(x, y)`.
xloc: string . Type of axis unit, bar_index or time.
bg_color: color . Color of the background.
line_color: color . Color of the line.
line_style: string . Style of the line.
line_width: int . Width of the line.
Returns: Triangle object.
copy(this)
Copy a existing triangle object.
Parameters:
this: Triangle . Source triangle.
Returns: Triangle.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_a(this, position)
Set the position of corner `a` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_b(this, position)
Set the position of corner `b` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_c(this, position)
Set the position of corner `c` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_style(this, bg_color, line_color, line_style, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
bg_color: color . Color of the background.
line_color: color . Color of the line.
line_style: string . Style of the line.
line_width: int . Width of the line.
Returns: Source Triangle.
set_bg_color(this, bg_color)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
bg_color: color . Color of the background.
Returns: Source Triangle.
set_line_color(this, line_color)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_color: color . Color of the line.
Returns: Source Triangle.
set_line_style(this, line_style)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_style: string . Style of the line.
Returns: Source Triangle.
set_line_width(this, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_width: int . Width of the line.
Returns: Source Triangle.
move(this, x, y)
Move triangle by provided amount (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: float . Amount to move the vertices of the triangle in the x axis.
y: float . Amount to move the vertices of the triangle in the y axis.
Returns: Source Triangle.
move(this, amount)
Move triangle by provided amount (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
amount: Vector2 . Amount to move the vertices of the triangle in the x and y axis.
Returns: Source Triangle.
rotate_around(this, center, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
center: Vector2 . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Triangle.
rotate_around(this, center_x, center_y, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
center_x: int . Center coordinates of the rotation.
center_y: float . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Triangle.
Functions to draw a triangle and manipulate its properties.
new(a, b, c, xloc, bg_color, line_color, line_style, line_width)
Draws a triangle with background fill using line prototype.
Parameters:
a: v2 . Vector2 object, in the form `(x, y)`.
b: v2 . Vector2 object, in the form `(x, y)`.
c: v2 . Vector2 object, in the form `(x, y)`.
xloc: string . Type of axis unit, bar_index or time.
bg_color: color . Color of the background.
line_color: color . Color of the line.
line_style: string . Style of the line.
line_width: int . Width of the line.
Returns: Triangle object.
copy(this)
Copy a existing triangle object.
Parameters:
this: Triangle . Source triangle.
Returns: Triangle.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_a(this, position)
Set the position of corner `a` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_b(this, position)
Set the position of corner `b` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Triangle.
set_position_c(this, position)
Set the position of corner `c` (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
position: Vector2 . New position.
Returns: Source Triangle.
set_style(this, bg_color, line_color, line_style, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
bg_color: color . Color of the background.
line_color: color . Color of the line.
line_style: string . Style of the line.
line_width: int . Width of the line.
Returns: Source Triangle.
set_bg_color(this, bg_color)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
bg_color: color . Color of the background.
Returns: Source Triangle.
set_line_color(this, line_color)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_color: color . Color of the line.
Returns: Source Triangle.
set_line_style(this, line_style)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_style: string . Style of the line.
Returns: Source Triangle.
set_line_width(this, line_width)
Update triangle style options (modifies Source triangle).
Parameters:
this: Triangle . Source triangle.
line_width: int . Width of the line.
Returns: Source Triangle.
move(this, x, y)
Move triangle by provided amount (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
x: float . Amount to move the vertices of the triangle in the x axis.
y: float . Amount to move the vertices of the triangle in the y axis.
Returns: Source Triangle.
move(this, amount)
Move triangle by provided amount (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
amount: Vector2 . Amount to move the vertices of the triangle in the x and y axis.
Returns: Source Triangle.
rotate_around(this, center, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
center: Vector2 . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Triangle.
rotate_around(this, center_x, center_y, angle)
Rotate source triangle around a center (modifies source triangle).
Parameters:
this: Triangle . Source triangle.
center_x: int . Center coordinates of the rotation.
center_y: float . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Triangle.
릴리즈 노트
v2Added:
method delete(this)
Namespace types: TDraw.Triangle
Parameters:
this (Triangle type from RicardoSantos/CommonTypesDrawing/1)
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.