6.7. Schlagschatten

6.7.1. Wirkungsweise

Abbildung 17.120. Anwendungsbeispiel für das Filter »Schlagschatten«

Anwendungsbeispiel für das Filter »Schlagschatten«

Originalbild

Anwendungsbeispiel für das Filter »Schlagschatten«

Using the GEGL Drop Shadow


With this GEGL filter you can add a drop-shadow to an image, a selection or a text. You may choose the color, position, and size of the shadow.

6.7.2. Filteraufruf

Dieses Filter lässt sich über das Menü FilterLicht und SchattenSchlagschatten … im Bildfenster aufrufen.

This filter is normally disabled. You must add an Alpha channel to your image to use it.

6.7.3. Eigenschaften

Abbildung 17.121. Eigenschaften des Filters »Schlagschatten«

Eigenschaften des Filters »Schlagschatten«

Presets, Preview, Split view
[Anmerkung] Anmerkung

These options are described in Abschnitt 2, „Gemeinsame Funktionsmerkmale“.

X, Y

Die Ebene, die den Schlagschatten enthält, wird horizontal und vertikal um X bzw Y Pixel verschoben. Das heißt, der X- und Y-Versatz legt fest, wo der Schatten in Relation zum Bild platziert wird. Höhere Werte lassen den Schatten weiter entfernt erscheinen, niedrigere Werte näher am Bild.

Der Versatz kann jeweils negativ sein, was zu einem Schatten links von der Auswahl (Versatz X < 0) bzw. oberhalb der Auswahl (Y < 0) führt.

Out of sheer curiosity, you can see the drop shadow layer clearly by setting blur radius to 0 and moving the drop shadow with X and Y.

Weichzeichnenradius

After creating the shadow, a Gaussian blur with the specified radius is applied to the shadow layer, resulting in the realistic appearance of the drop shadow.

Farbe

The shadow may have any color. Just click on the color swatch, and select a color when the color selector pops up or use the eye-dropper.

Deckkraft

Shadow opacity. It defaults to 0.500, but you may select any other value from 0 (full transparency) to 2.00 (full opacity) here.

6.7.4. Using Drop Shadow Filter

This GEGL Drop Shadow filter is surprising: if you apply the filter directly to the image as you do with the legacy filter, you get nothing!

To get the same result as the legacy filter:

  1. Open your original image.

  2. Open a new image, a little bigger than your original image, filled with transparency.

  3. Copy your original image and paste it into the new image. A floating selection is created in the layer dialog.

  4. Anchor the floating selection.

  5. Menus/Layer/Crop to content.

  6. Menus/Layer/Layer boundary size: set layer size to the same size than your image and filled with transparency; click on the Center button. Then click on the Resize button.

  7. Open the Drop Shadow dialog: the drop shadow is displayed in the on-canvas preview. You can change the default options values.

  8. Eventually, add a new layer, with the same size as the image and filled with the color you want to give to the background. Move this layer to the bottom of the layer stack.

  9. Click on the OK to apply filter.

Applying filter to a selection:

  1. Open your original image.

  2. Open a new image, the same size as your original image, filled with transparency.

  3. Create the selection

  4. Copy the selection and paste it into the new image. A floating selection is created in the layer dialog.

  5. Anchor the floating selection.

  6. Menus/Layer/Crop to content.

  7. Menus/Layer/Layer to image size (with transparency).

  8. Open the Drop Shadow dialog: the drop shadow is displayed in the on-canvas preview. You can change the default options values.

  9. Eventually, add a new layer, with the same size as the image and filled with the color you want to give to the background. Move this layer to the bottom of the layer stack.

    You can also use your original image as background: undo the selection, copy the image and paste it as new layer in the new image. Move the new layer to the bottom of the layer stack.

  10. Click on the OK to apply filter.

Applying filter to a text:

The procedure is more simple to create a drop shadow for a text: create the text and apply the Drop Shadow filter directly.