After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 402113 - Allow invisible objects through a 'transparent' color
Allow invisible objects through a 'transparent' color
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-29 14:33 UTC by Christian Ridderström
Modified: 2011-04-03 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Partial transparent background color effect (576.35 KB, image/png)
2009-08-21 15:35 UTC, Hans Breuer
Details

Description Christian Ridderström 2007-01-29 14:33:00 UTC
I'd like to be able to select a "colour" that is actually transparent, with the result that it is possible to create objects that are invicible in practice.
Today the workaround to create an "invisible" object is to set its colour
to that of the background.

Perhaps it'd be enough if the color selection dialog allows you to select a transparent color. Otherwise the property dialog needs to get checkboxes for toggling the transparency. Possibly a continous transparency setting is desirable.
Comment 1 Hans Breuer 2007-01-29 22:43:33 UTC
Having an invisible object sound like being a wor-around for something else (maybe some misculation of diagram boundaries for printing). If there is a real use-case beside a work-around please elaborate. Otherwise you should probably close this bug and write one for the issue you want to work around ;)
Comment 2 Christian Ridderström 2007-01-30 08:54:59 UTC
*sigh* This is why I prefer discussion bugs etc before actually filing them.
Now the discussion will happen here instead of in the list and I'm too lazy to move it there.

It is true I thought of it as a workaround, but although I don't remeber the use cases right now, it has been useful in other drawing softwares (eg TGif) to be able to select an "invisible" color.

Anyway, here is the situation:

I was working with an object (a rectangle) that I needed to give some extra connection points. AFAIK, the recommended way is to attach a line between two of the corners, and give that line more connection points. Just before that, I'd used a line that I made "invisible" and added connection points to it, and then attached text objects to the line. 

Currently the drawback with this approach is that you always have to make sure the line´s color is that of whatever is in the background. 

So in this particular case it might actually just be about making *lines* transparent.

When it comes to most objects, they have a setting for drawing/not drawing the background. I guess that could be considered an existing option that lets you have an invisible/transparent background.

It's sort of related, but I'd like a better way of controlling the connection points on a line. I'll bring up that issue on the mailing list before I file it in bugzilla.

Comment 3 Lars Clausen 2007-03-08 21:12:14 UTC
A transparent color or transparency setting is not the correct solution to your problem.  However, it is a very useful thing in and of itself, for instance for doing Venn diagrams or shading areas.  A number of the exporters would not be able to support it, and adding support to those that can would be the major part of the code required to implement this.
Comment 4 Christian Ridderström 2007-03-09 11:24:56 UTC
And?  (I'm not sure what, if any, further input you'd like from me)
Comment 5 Lars Clausen 2007-03-16 20:15:58 UTC
Nothing, really, unless it's a patch that adds transparency:)
Comment 6 Francesco Montorsi 2009-01-22 10:51:55 UTC
Hi,
   I'd love to have the "transparent colour" feature, too.
This could be used not only to do fancy things like those previously mentioned in comment #3 but also to e.g. set the background colour as transparent and so export PNG with a transparent background (instead of a solid colour).

Currently I have to export my DIA diagrams as PNG with white background, then load them with GIMP and manually add the alfa channel... it's really uncomfortable! Please add this feature!
Comment 7 Hans Breuer 2009-01-22 21:35:03 UTC
(In reply to comment #6)
> export PNG with a transparent background (instead of a solid colour).
this already is possible with Dia 0.96.x, please try to export as "Cairo PNG (with alpha)" 
Comment 8 Francesco Montorsi 2009-01-24 09:39:29 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > export PNG with a transparent background (instead of a solid colour).
> this already is possible with Dia 0.96.x, please try to export as "Cairo PNG
> (with alpha)" 
Using the stock Dia 0.96.1 coming with Ubuntu 8.04 I don't see that save option; wrt to PNG I have two only options: "Portable Network Graphics (*.png)" and "Pixbuf[png] (*.png)". None of them exports the background as transparent.

Btw if I go under Diagram->Properties and then click on the tab "Colours" I see the background colour is set to white, so I think it's right that saving to PNG generates images with white background. If I could select "transparent" as background colour, I think that it would be logical to create transparent PNG when exporting...


Comment 9 Hans Breuer 2009-08-21 15:35:36 UTC
Created attachment 141350 [details]
Partial transparent background color effect

Playing with the patch from bug #591525 I got the attached effect. To me this makes the idea of controlling the background transparency for export via the diagrams background color transparency not that appealing.
With the current drawing model the background color must be opaque, because it is used to clear the background to a defined state.
Comment 10 Hans Breuer 2011-04-03 17:00:50 UTC
With the alpha branch merged to master this feature is available (see bug #591525 for detaily), of course with above mentioned limitation. Not all renderers are supporting transparency so making objects completely transparent doe not always make them invisble ;)