class WindowShadowRenderer implements WindowPostRenderer {
    @Override
    public void postRender(
            ThemedTextGraphics textGraphics,
            TextGUI textGUI,
            Window window) {<FILL_FUNCTION_BODY>}
}


        TerminalPosition windowPosition = window.getPosition();
        TerminalSize decoratedWindowSize = window.getDecoratedSize();
        ThemeDefinition themeDefinition = window.getTheme().getDefinition(WindowShadowRenderer.class);
        textGraphics.applyThemeStyle(themeDefinition.getNormal());
        char filler = themeDefinition.getCharacter("FILLER", ' ');
        boolean useDoubleWidth = themeDefinition.getBooleanProperty("DOUBLE_WIDTH", true);
        boolean useTransparency = themeDefinition.getBooleanProperty("TRANSPARENT", false);

        TerminalPosition lowerLeft = windowPosition.withRelativeColumn(useDoubleWidth ? 2 : 1).withRelativeRow(decoratedWindowSize.getRows());
        TerminalPosition lowerRight = lowerLeft.withRelativeColumn(decoratedWindowSize.getColumns() - (useDoubleWidth ? 3 : 2));
        for(int column = lowerLeft.getColumn(); column <= lowerRight.getColumn() + 1; column++) {
            char characterToDraw = filler;
            if(useTransparency) {
                TextCharacter tc = textGraphics.getCharacter(column, lowerLeft.getRow());
                if (tc != null) {
                    characterToDraw = tc.getCharacterString().charAt(0);
                }
            }
            textGraphics.setCharacter(column, lowerLeft.getRow(), characterToDraw);
            if (TerminalTextUtils.isCharDoubleWidth(characterToDraw)) {
                column++;
            }
        }

        lowerRight = lowerRight.withRelativeColumn(1);
        TerminalPosition upperRight = lowerRight.withRelativeRow(-decoratedWindowSize.getRows() + 1);
        boolean hasDoubleWidthShadow = false;
        for(int row = upperRight.getRow(); row < lowerRight.getRow(); row++) {
            char characterToDraw = filler;
            if(useTransparency) {
                TextCharacter tc = textGraphics.getCharacter(upperRight.getColumn(), row);
                if (tc != null) {
                    characterToDraw = tc.getCharacterString().charAt(0);
                }
            }
            textGraphics.setCharacter(upperRight.getColumn(), row, characterToDraw);
            if (TerminalTextUtils.isCharDoubleWidth(characterToDraw)) {
                hasDoubleWidthShadow = true;
            }
        }

        textGraphics.applyThemeStyle(themeDefinition.getNormal());
        if(useDoubleWidth || hasDoubleWidthShadow) {
            //Fill the remaining hole
            upperRight = upperRight.withRelativeColumn(1);
            for(int row = upperRight.getRow(); row <= lowerRight.getRow(); row++) {
                char characterToDraw = filler;
                if(useTransparency) {
                    TextCharacter tc = textGraphics.getCharacter(upperRight.getColumn(), row);
                    if (tc != null && !tc.isDoubleWidth()) {
                        characterToDraw = tc.getCharacterString().charAt(0);
                    }
                }
                TextCharacter neighbour = textGraphics.getCharacter(upperRight.getColumn() - 1, row);
                // Only need to draw this is the character to the left isn't double-width
                if (neighbour != null && !neighbour.isDoubleWidth()) {
                    textGraphics.setCharacter(upperRight.getColumn(), row, characterToDraw);
                }
            }
        }
    
<no_super_class>