PixelSnap won't work

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

PixelSnap won't work

Postby Bucic » Thu Oct 14, 2010 5:13 am

I know how it works and I know what should be the outcome. I even used it few times. I also created a test svg with few bitmaps and lines and PixelSnap did it's work. But not for certain document I've recently created. In that document id behaves normally... but does nothing. Can anyone take a look?
http://www.mediafire.com/file/65zc8myry ... etch02.svg
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

bryhoyt
Posts: 7
Joined: Wed Sep 23, 2009 7:33 am

Re: PixelSnap won't work

Postby bryhoyt » Thu Oct 14, 2010 5:34 am

Hi,

I'm the author of PixelSnap, so I'll look into this. Could you please post an official bug at http://code.google.com/p/pixelsnap/issues/entry ?

Thanks!
Bryan

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Thu Oct 14, 2010 6:00 am

Whatever you say, I'm grateful for the extension, but don't you think we would rush things to much? I mean we're not even sure it's a bug? Or did you look into my svg already?
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: PixelSnap won't work

Postby prkos » Thu Oct 14, 2010 8:00 am

I can confirm the bitmaps in the file seem to snap horizontally but vertically they fall in the pixel middle.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Thu Oct 14, 2010 8:05 am

Not exactly in the middle. Sorry if you knew that.

OK, I'll fill the bug report tomorrow. Good night!
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

bryhoyt
Posts: 7
Joined: Wed Sep 23, 2009 7:33 am

Re: PixelSnap won't work

Postby bryhoyt » Sat Oct 16, 2010 7:01 am

Hi Bucic, sorry, didn't mean to make a hassle for you -- it's just easier for me to manage the issues centrally via the issue tracker. Doesn't really matter if it's not a confirmed bug yet. It just means it doesn't get forgotten if I don't get to it immediately.

Anyway, I'm more than happy to look at the SVG file from here, which I've now done... and yes, I can confirm your observations. The bitmaps snap horizontally but not vertically. I might not get a chance to look into it until later next week.

If you could still post an official bug on the issues page, that would be helpful, thanks, just as a reminder for me.

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Mon Oct 18, 2010 4:16 am

Are you kidding me?! It's in my interest and the least I can do show my appreciation to the author of such a useful extension Image

Edit:
Bug report submitted http://code.google.com/p/pixelsnap/issues/detail?id=9
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Wed Dec 29, 2010 5:19 am

Any news?
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

bryhoyt
Posts: 7
Joined: Wed Sep 23, 2009 7:33 am

Re: PixelSnap won't work

Postby bryhoyt » Wed Dec 29, 2010 6:39 am

Hi Bucic, yes, good news. I've finally had a chance (in the last couple of days, during my Christmas) to have a proper look at this. Good news: I've located the bug, and I've fixed it in my local copy of the code. I need to do a few tidy-ups and some testing to make it production-ready, but expect to see a downloadable file in a few days (probably on my day-after-New-Year's holiday).

Sorry for the delay on this!

Briefly, the bug is due to the an object's ancestor(s) having a non-integer translation (in other words, the group or layer that an objects is part of isn't aligned to a pixel boundary). Until now, PixelSnap didn't look at the hierarchy above the currently selected objects. So if a Layer is shifted by a fraction of a pixel, none of the selected objects would be aligned correctly.

In your case, the "bmp" layer is shifted by -29.375 pixels. You can see this if you open up the XML editor and look at the "transform" attribute of the "bmp" layer. You can fix it manually by setting just that value to -29. My upcoming release will do this automatically.

How does a layer get shifted like that, without you ever asking Inkscape to do so? When you change the Document dimensions in the Document Properties dialogue, Inkscape automatically adjusts each Layer's translation to account for the (slightly weird) fact that all objects are positioned relative to the non-zero edge of the page (if it were me, I'd position all objects relative to zero, so they wouldn't shift when I change the page height, but higher powers than me have decided otherwise!)

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Wed Dec 29, 2010 8:08 am

Great! As I said before you don't owe me nothing and I owe you a lot :) Thanks for the technical explanation too.

Initially I didn't see any use for your extension but that was before I learned about grid snapping and its importance. Please post a release notification in this topic, OK?
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

bryhoyt
Posts: 7
Joined: Wed Sep 23, 2009 7:33 am

Re: PixelSnap won't work

Postby bryhoyt » Tue Jan 04, 2011 7:52 am

Hi Bucic,

I've fixed the bug you've described -- it was an issue for me a couple times, too, so I'm glad to have it fixed. I'm not ready to make a full new release yet, but you can download the new files from the bug report page here: http://code.google.com/p/pixelsnap/issues/detail?id=9

Could you please give that a quick test and post a reply on the bug report page how well it works (or if it doesn't work!)

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Tue Jan 04, 2011 7:57 am

I treated the same file with Extensions - Modify path - 'Development pixelsnap', default options after simply selecting all objects by Ctrl+A. Effect? Seems to be fixed.

Thanks for your work on this bug!

P.S. I've attached the modified drawing in a comment on code.google.
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Wed Jan 05, 2011 10:00 am

Here's a little demo ;)
Although I didn't use layers in this one. It was a quickie.

P.S. Poor rasterheads :D
Image

Edit:
And an improved one. All Inkscape.

Image
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: PixelSnap won't work

Postby Bucic » Thu Jan 13, 2011 7:12 am

Another issue report submitted http://code.google.com/p/pixelsnap/issues/detail?id=10
I used the Pixel Snap dev. version you've send me.
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l


Return to “Help with using Inkscape”