PINE LIBRARY
已更新 Vector2DrawQuad

Library "Vector2DrawQuad"
functions to handle vector2 Quad drawing operations.
new(a, b, c, d, xloc, bg_color, line_color, line_style, line_width)
Draws a quadrilateral with background fill.
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)`.
d: 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: Quad object.
copy(this)
Copy a existing quad object.
Parameters:
this: Quad . Source quad.
Returns: Quad.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_a(this, position)
Set the position of corner `a` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_b(this, position)
Set the position of corner `b` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_c(this, position)
Set the position of corner `c` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_d(this, x, y)
Set the position of corner `d` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_d(this, position)
Set the position of corner `d` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_style(this, bg_color, line_color, line_style, line_width)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
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 Quad.
set_bg_color(this, bg_color)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
bg_color: color . Color of the background.
Returns: Source Quad.
set_line_color(this, line_color)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_color: color . Color of the line.
Returns: Source Quad.
set_line_style(this, line_style)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_style: string . Style of the line.
Returns: Source Quad.
set_line_width(this, line_width)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_width: int . Width of the line.
Returns: Source Quad.
move(this, x, y)
Move quad by provided amount (modifies source quad).
Parameters:
this: Quad . Source quad.
x: float . Amount to move the vertices of the quad in the x axis.
y: float . Amount to move the vertices of the quad in the y axis.
Returns: Source Quad.
move(this, amount)
Move quad by provided amount (modifies source quad).
Parameters:
this: Quad . Source quad.
amount: Vector2 . Amount to move the vertices of the quad in the x and y axis.
Returns: Source Quad.
rotate_around(this, center, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this: Quad . Source quad.
center: Vector2 . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Quad.
rotate_around(this, center_x, center_y, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this: Quad . Source quad.
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 Quad.
functions to handle vector2 Quad drawing operations.
new(a, b, c, d, xloc, bg_color, line_color, line_style, line_width)
Draws a quadrilateral with background fill.
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)`.
d: 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: Quad object.
copy(this)
Copy a existing quad object.
Parameters:
this: Quad . Source quad.
Returns: Quad.
set_position_a(this, x, y)
Set the position of corner `a` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_a(this, position)
Set the position of corner `a` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_b(this, x, y)
Set the position of corner `b` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_b(this, position)
Set the position of corner `b` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_c(this, x, y)
Set the position of corner `c` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_c(this, position)
Set the position of corner `c` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_position_d(this, x, y)
Set the position of corner `d` (modifies source quad).
Parameters:
this: Quad . Source quad.
x: int . Value at the x axis.
y: float . Value at the y axis.
Returns: Source Quad.
set_position_d(this, position)
Set the position of corner `d` (modifies source quad).
Parameters:
this: Quad . Source quad.
position: Vector2 . New position.
Returns: Source Quad.
set_style(this, bg_color, line_color, line_style, line_width)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
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 Quad.
set_bg_color(this, bg_color)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
bg_color: color . Color of the background.
Returns: Source Quad.
set_line_color(this, line_color)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_color: color . Color of the line.
Returns: Source Quad.
set_line_style(this, line_style)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_style: string . Style of the line.
Returns: Source Quad.
set_line_width(this, line_width)
Update quad style options (modifies Source quad).
Parameters:
this: Quad . Source quad.
line_width: int . Width of the line.
Returns: Source Quad.
move(this, x, y)
Move quad by provided amount (modifies source quad).
Parameters:
this: Quad . Source quad.
x: float . Amount to move the vertices of the quad in the x axis.
y: float . Amount to move the vertices of the quad in the y axis.
Returns: Source Quad.
move(this, amount)
Move quad by provided amount (modifies source quad).
Parameters:
this: Quad . Source quad.
amount: Vector2 . Amount to move the vertices of the quad in the x and y axis.
Returns: Source Quad.
rotate_around(this, center, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this: Quad . Source quad.
center: Vector2 . Center coordinates of the rotation.
angle: float . Value of angle in degrees.
Returns: Source Quad.
rotate_around(this, center_x, center_y, angle)
Rotate source quad around a center (modifies source quad).
Parameters:
this: Quad . Source quad.
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 Quad.
版本注释
v2Added:
method delete(this)
Namespace types: TDraw.Quad
Parameters:
this (Quad type from RicardoSantos/CommonTypesDrawing/1)
Pine脚本库
本着真正的TradingView精神,作者将此Pine代码发布为开源库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私密或在其他开源出版物中使用此库,但在出版物中重复使用此代码受网站规则约束。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
Pine脚本库
本着真正的TradingView精神,作者将此Pine代码发布为开源库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私密或在其他开源出版物中使用此库,但在出版物中重复使用此代码受网站规则约束。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。