discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRC: is it possible to show grid


From: Prof. M.B. Patil
Subject: Re: GRC: is it possible to show grid
Date: Tue, 8 Mar 2022 09:00:02 +0530 (IST)
User-agent: Alpine 2.21 (LRH 202 2017-01-01)


Thank you. This will be helpful. I was trying to
see if Gtk allows grid drawing with a single command,
but I could not find that. In that case, I guess I
have to do two loops: one for horizontal lines
(using move_to/line_to) and one for vertical lines.
If there is a better way, please let me know.

M.Patil



On Mon, 7 Mar 2022, Sebastian Koslowski wrote:

There is no option for that AFAIK.
To implement it, you'll want to start here: 
https://github.com/gnuradio/gnuradio/blob/main/grc/gui/DrawingArea.py#L213
The grid size is defined in 
https://github.com/gnuradio/gnuradio/blob/main/grc/gui/Constants.py#L50
Best add a color 
in?https://github.com/gnuradio/gnuradio/blob/main/grc/gui/canvas/colors.py
To make it optional grep for some action like TOGGLE_SNAP_TO_GRID and add your 
own in the same manner.?

Sebastian

On Mon, Mar 7, 2022 at 6:32 PM Prof. M.B. Patil <mbpatil@ee.iitb.ac.in> wrote:

      Dear All,

      Is there a way to display the grid (to which
      blocks get locked) on the canvas? If not, any
      tips on how to implement it?

      Thanks.
      M.Patil









reply via email to

[Prev in Thread] Current Thread [Next in Thread]