How to draw using mouse like pencil tool in GIMP or Photoshop?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By cody
:warning: Old Version Published before Godot 3 was released.

I want to draw lines using mouse just like when I use pencil or brush tool in GIMP or Photoshop. Not straight lines, but lines that can follow my cursor. So far I have tried using draw_line and draw_polygon but it didn’t go as what I want to achieve.

How can I achieve that using gdscript?

Thanks

:bust_in_silhouette: Reply From: alexholly

Have you tried draw_rect , draw_circle or draw_texture?

A pencil is not drawing lines it is drawing pixels/textures
If you choose in gimp the line tool it will use draw_line

For pixel style I would try draw_rect
For different brushes draw_texture