Search code examples
pythongraphicspycairo

How to represent a dot using pycairo


I'm learning to use Pycairo and I'm doing well till now, I can graph lines/bezier curves and soon, mathematical curves, I tried to express the point as a very tiny line but it doesn't work

I tried this too

context.move_to(5,5)
context.line_to(5,5)

I thought it may get me a dot but it was a line without length so it didn't appear, I can't seem to find a way to represent a dot, like I have a grid and I want to draw a dot like we do in maths classes, any suggestions for an approach? so,

  • I tried a line with a very tiny length (which didn't work)
  • I tried a circle with zero radius

Till I realised that it's a circle with a tiny radius approaching zero, not zero. The idea just escaped out of my mind


Solution

  • How stupid of me, It's a filled circle of a radius approaching zero, Thanks martineau for helping.