pcb

Change-request: refactor grid

Bug #1945893 reported by Dirk Gouders
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Committed
Medium
Bert Timmerman

Bug Description

I prepared two patches for the grid functionality.

On my environment (GTK), the grid is hardly if at all visible and with the
attached patches it might become more useful.

Sorry if this is the wrong place to submit such enhancement patches.

Revision history for this message
Dirk Gouders (dgouders) wrote :
Revision history for this message
Dirk Gouders (dgouders) wrote :

This second patch just introduces a short-cut for the grid.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote (last edit ):

Hi Dirk,

Thank you for your bug report and patches, here is the best place to submit them.

I will look into your patches shortly.

I already have a patch for a dynamic grid dot thickness (not grid spacing) waiting to be pushed to a new release of pcb.

Kind regards,

Bert Timmerman.

Changed in pcb:
assignee: nobody → Bert Timmerman (bert-timmerman)
importance: Undecided → Medium
Revision history for this message
Dirk Gouders (dgouders) wrote :

Hi Bert,

thank you for your prompt response.

I already have fixes for my patches in mind (e.g. remove the asssert.h that I used for testing)
but those won't affect functionality. So, I prefer to wait until you and/or someone had a look at the new functionality. I could also imagine to use screen dimensions to calculate the size of the grid-dots...

Yes, I noticed your patch but as it does not fix the grid for me I decided
to send more patches to fix grid issues.

Kind regards,

Dirk

Revision history for this message
Bert Timmerman (bert-timmerman) wrote (last edit ):

Hi Dirk,

I tested your patches.

The first batch requires some tidying up, the assert include needs to go.

Another request is that I like you to attach screenshots of the improvement it gives, this because I can hardly detect any improvement between "master" and "patch" versions.

I do realize this may be because of my hardware, theme or OS/distro (Ubuntu 20.04.3 LTS 64 bit).

Your second patch will be included as is.

Note to self: I need to get this functionality into the lesstif GUI as well (I have to make a bug report to not forget).

Kind regards,

Bert Timmerman.

Revision history for this message
Dirk Gouders (dgouders) wrote :

Hi Bert,

thank you for testing the patch.

It seems we are using different HIDs, that would explain why I also did not detect any
differences with your grid thickness patch.

I have now been using my new grid visualization for the board I am currently working on
and it turned out I had to improve some parameters I also removed the assert.h and
fixed a coding standard issue. Finally, I reworked the commit message a bit.

I also prepared six screenshots showing the differences (that I see, i.e. GTK HID).

Kind regards,

Dirk

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #1

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #2 (I wished one could attach more attachments at once)

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #3

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #4

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #5

Revision history for this message
Dirk Gouders (dgouders) wrote :

Screenshot #6

Revision history for this message
Dirk Gouders (dgouders) wrote :

Hi Bert,

I now understood the difference in our setups: --enable-gl

I enabled this configure-option and I wouldn't have complained about
the grid produced by hidgl_draw_grid () -- although I prefer a bit bigger grid-dots.

My patch introduces much bigger grid-dots that should probably
reduced in diameter. Anyway, with just points (i.e. size 1)
it is really hard to see the grid-dots at all.

Kind regards,

Dirk

Revision history for this message
Bert Timmerman (bert-timmerman) wrote (last edit ):

Hi Dirk,

The --enable-gl back-end is default (if gl is available, otherwise it barfs), I didn't think of that one.

I would like to have the gdk and gl back-ends have similar sizes for grid dots, as to keep things in line where possible.

I have to look a this later this evening, I'm now working in a topic branch (gtk3 gui).

Kind regards,

Bert Timmerman.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Dirk,

Did you look at hidgl_draw_grid () in src/hid/common/hidgl.c:121 and further.

It gets interesting at line 164.

Kind regards,

Bert Timmerman.

Revision history for this message
Dirk Gouders (dgouders) wrote :

Hi Bert,

for completeness: Gentoo marked gtkglext as end-of-life and prepared depending packages to not use it any more [1]. That is why pcb was configured with --disable-gl on my machine.

Thank you for the pointer and I created a new patch that simply packports the grid-dot
visialization from hidgl_draw_grid().

I could not find a way to make gdk_draw_points() draw points more than a pixel wide, so
I kept using gdk_draw_arc() to draw the grid-dots.

Kind regards,

Dirk

[1] https://bugs.gentoo.org/698950

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Pushed to master.

Changed in pcb:
milestone: none → pcb-4.3.1
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.