Skip to content

draw_line_width_color

CryoEagle edited this page Jan 13, 2019 · 1 revision

draw_line_width_color

Draw line with width option and color option

Syntax:

draw_line_width_color(pos1, pos2, width, c1, c2, c3, c4, angle)
Argument Description
Vector2 pos1 First position
Vector2 pos2 Second position
int width Thickness
Color c1 First color
Color c2 Second color
Color c3 Third color
Color c4 Fourth color
double angle Rotation of line

Returns: void

Description:

This function draws line, it's like draw_line_width(); but this have colors options that can make gradient effect.

Example:

draw_line_width_color(new Vector2(Position.X,Position.Y), new Vector2(Position.X+100,Position.Y), 5, Microsoft.Xna.Framework.Color.Green, Microsoft.Xna.Framework.Color.Pink, Microsoft.Xna.Framework.Color.Gold, Microsoft.Xna.Framework.Color.Navy );

Above code will draw bold line with gradient effect.

Back to Shapes

Clone this wiki locally