Adding drop shadow to rotated object issue

Bug #562283 reported by Olof Bjarnason
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Wishlist
Unassigned

Bug Description

Version: Inkscape 0.47 r22583, built Nov 21 2009

1. [F4] Draw a rectangle
2. [Ctrl+D] Duplicate it and move it adjacent to the first
3. Rotate the second rectangle 30-40 degrees
4. Filters->Shadows and glow->Drop shadow: Add a drop shadow with X- and Y offset set to 4 pixels to rectangle one
5. Do the same with rectangle two

Notice how the drop shadow is positioned relative to the (non-visible) rotation of the rectangle, as if the delta X/Y values of the drop shadow filter are applied in object coordinates, not drawing coordinates.

I don't know if this is a bug or a feature, but it sure feels non-intuitive. For example, if I get a drawing from a friend, I have no idea how the objects are rotated (is there a way to see the rotation?).

Olof Bjarnason (objarni)
description: updated
description: updated
su_v (suv-lp)
tags: added: filters-svg transformations
Revision history for this message
Niko Kiirala (kiirala) wrote :

Unintuitive as it may be in this situation, having the object rotate as whole - filters and all - is the more intuitive way in many other situations. Neither way is clearly better, so now it's implemented the simple way. Bug #386675 discusses a highly related concern, could be considered a duplicate, even.

As a workaround, IIRC, grouping the rotated rectangle (yes, a group containing one object) and filtering the group gives drop shadow with offset in document units.

Revision history for this message
Olof Bjarnason (objarni) wrote :

Niko - yes I agree it is intuitive that eg. drop shadows rotates with the object in question.

But in the situation I describe, I apply the filter after the rotation, making me have to think about what rotation my objects have (it's not clearly visible anywhere).

The Drop Shadow dialog states "Horisontal offset" and "Vertical offset". At least I interpret that as "horisontal to the screen" and "vertical compared to the screen".

If the Drop Shadow dialog had "Horisontal/vertical offset relative to object" it would be clearer what was meant; however it would still be hard to judge what it meant (the object's local coordinate system isn't visible anywhere).

Thanks for the workaround!

Revision history for this message
jazzynico (jazzynico) wrote :

As far as I understand, the filters take the object's transform (matrix) attribute into account and use it to calculate its own rotation.
You can also convert your object to path. In this case, you no longer have a rotated shape, but a path with no matrix value, and thus the expected drop shadow offset.

Niko> Bug #386675 discusses a highly related concern, could be considered
Niko> a duplicate, even.

I second this suggestion and mark this report duplicate.
Olof, don't hesitate to revert the status if you think this is a different issue, or use Bug #386675 if you wish to add a comment.

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Olof Bjarnason (objarni) wrote :

JazzyNico/Niko - thanks for you replies I can see they are related.

So some entities in Inkscape have a matrix (object transform), and some don't. And because of this, the drop shadow filter behaves slightly differently on those different entities.

I'm not sure what would be a "fix" for this, but it sure feels inconsequent that a drop shadow of (4,4) pixel offset (screen coordinates) does not get placed (4,4) pixels offset from the entity - whether or not it has a transform matrix ;)

I'll drop the subject since several workarounds have been mentioned. Cya,

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.