otfried / ipe

The Ipe extensible drawing editor
http://ipe.otfried.org
140 stars 11 forks source link

Background color #157

Closed pierreganty closed 5 years ago

pierreganty commented 6 years ago

I am trying to make slides with a black background.

Following the documentation the .ipe file contains

<symbol name="Background" transformations="translations" xform="yes">
<path stroke="black" fill="black">
-32 600 m
-32 0 l
768 0 l
768 600 l
h
</path>
</symbol>

The 'trick' of adding a layer named "BACKGROUND" and setting it invisible to not display the background (as written in the wiki does not work with Ipe 7.2.7).

pierreganty commented 6 years ago

Actually, almost everything works as announced. Only the presence/absence of the BACKGROUND layer seems to import for display.

otfried commented 6 years ago

"Almost everything" seems to imply that something doesn't work - please do point out if you find something that is not working as documented or intended.

pierreganty commented 6 years ago

The doc mentions the visible/invisible checkbox to show/hide the background. It is actually the presence/absence of a BACKGROUND layer that hides/show the background (present = hide, absent = show). The visible / invisible switch of the BACKGROUND layer has no effect.

pierreganty commented 6 years ago

Hi @otfried. I just gave the talk featuring slides with a black background. Coupled with an xml editor (xmlstarlet) I reached a workflow that worked for me (probably suboptimal but I wanted to let you know). 1) I was doing the editing as always with black text. 2) Each page had a BACKGROUND layer 3) I set all my objects to a special color, say "special" 4) To see the results with a black background I run

cp white-background-slides.ipe black-background-slides.ipe 
xml ed --inplace -u "/ipe/ipestyle/color[@name='special']/@value" -v '1 1 1' -d "/ipe/page/layer[@name='BACKGROUND']" black-background-slides.ipe
ipetoipe -pdf black-background-slides.ipe

It does update (-u) the color with attribute 'special' and sets it to white. It does delete (-d) all the BACKGROUND layers in every page. 5) I looked at the result in black-background-slides.pdf and went back to white-background-slides.ipe when unhappy.

otfried commented 6 years ago

To document the process for other's, a nice place would be to put this on the wiki - here in a closed bugreport, nobody will ever see it...

In any case I'm reopening it to remind myself to fix the documentation of the BACKGROUND layer features.

otfried commented 5 years ago

Fixed manual for 7.2.8.