From c48e41ca7c7552f922d135844c1e0bacd1e48cde Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Wed, 11 Jul 2018 08:43:07 +0200 Subject: [PATCH] Revise the Luma documentation files --- gfx/luma_add/README.txt | 16 +++------ gfx/luma_add/colors/README.txt | 9 +++-- gfx/luma_add/colors/draw-collage.py | 51 ++++++++++++++--------------- gfx/luma_add/render.sh | 16 ++++----- 4 files changed, 44 insertions(+), 48 deletions(-) diff --git a/gfx/luma_add/README.txt b/gfx/luma_add/README.txt index bbfc1ad..cf51ba6 100644 --- a/gfx/luma_add/README.txt +++ b/gfx/luma_add/README.txt @@ -13,8 +13,8 @@ Individual files can be rendered in Inkscape with File > Export PNG Image (Full page at 96 dpi) -Unfortunately, Inkscape cannot export TGA images, -therefore it is necessary to convert the exported +Unfortunately, Inkscape cannot export TGA images. +Therefore it is necessary to convert the exported images afterwards, for example with the GIMP or ImageMagick (convert image.png image.tga). @@ -27,18 +27,12 @@ Structure I recommend to open the SVG files in a text editor for insight. Most images consist of simple path elements. SVG filters are applied to these paths to add blurs -and glows. Shared filters and gradients are explained -and stored in dedicated files per directory - - common.filters - common.gradients - -The filters should not require editing. A detailed -explanation of SVG filter elements is available at +and glows. The filters should not require editing. +More information about SVG filters is available at -Filters may be turned off with +In Inkscape, filters can be turned off with View > Display mode > No Filters diff --git a/gfx/luma_add/colors/README.txt b/gfx/luma_add/colors/README.txt index 3af7493..a4fb0bc 100644 --- a/gfx/luma_add/colors/README.txt +++ b/gfx/luma_add/colors/README.txt @@ -4,6 +4,9 @@ which allows them to be colorized in code. The suggested blend mode for colorization is addition. The suggested colors to be added are listed in colors.txt -The colors are chosen for consistent percieved luminance -and saturation. Though peer-review might be necessary to -account for diverse screen settings and perceptions. +The automtically generated print-float.txt includes float +representations of the colors, for easy copy and paste. + +The colors are chosen for a consistent percieved brightness +and saturation. Peer-review might be necessary to account +for diverse screen settings and perceptions. diff --git a/gfx/luma_add/colors/draw-collage.py b/gfx/luma_add/colors/draw-collage.py index e50935c..78a0c63 100755 --- a/gfx/luma_add/colors/draw-collage.py +++ b/gfx/luma_add/colors/draw-collage.py @@ -26,29 +26,28 @@ ICON_FILE = "icon.tga" FONT_SIZE = 16 FONT_COLOR = ImageColor.getrgb("#ffffff") FONT_FILE = io.BytesIO(base64.b64decode(b""" -d09GRgABAAAAAAVIAA0AAAAACNgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAFLAAAABwAAAAc -hP9MNEdERUYAAAUIAAAAJAAAACYAKQA5T1MvMgAAAaAAAABFAAAAYCSOJrxjbWFwAAACAAAAAGAAAAFK -LsspBmdhc3AAAAUAAAAACAAAAAj//wADZ2x5ZgAAAogAAAG5AAAD5ClG3QZoZWFkAAABMAAAADMAAAA2 -DdIrKGhoZWEAAAFkAAAAHAAAACQAMgAPaG10eAAAAegAAAAXAAAALgBKABRsb2NhAAACYAAAACgAAAAo -CCQJCG1heHAAAAGAAAAAHgAAACAAWAApbmFtZQAABEQAAACiAAABKdbKpU1wb3N0AAAE6AAAABYAAAAg -//4AA3icY2BkYGAA4otfdh6P57f5ysDNoAAUYbgeYCgEpgP3PGRgAjIEGCSAJAeYzQAAPT8JdQB4nGNg -ZGBgUPj/A0gKMYCAAAMjAypgAQBBKAJAeJxjYGRgYBBmUGNgZgABJiBmZACJOYD5DAAINQCCAAB4nGNg -YRBinMDAysDAIMIgBiRZoDQ/AyMDBwMDEwMrJwMMMDIgAQUgYDjAYMCQxiD1/xdQrQJIPVSNENgMBQZG -ANrDBZEAAAB4nGMQYmBhAAEhMGYC8phwQhYACywAXwB4nGNgYGBmgGAZBkYGEHAB8hjBfBYGDSDNBqQZ -GZgYLBnS/v8H8g0YEv///3/5/xqoeiBgZGOAcxiZgAQTAypgZMAAzCysbOwcnFzcPJhyWAEvH7+AoBCR -iukPAMq4CiEAAAASABIAEgA0AEIAYgCEAJoAtgDcAO4BIgFIAWoBhgGeAboB3AHyeJx1U8tuwyAQXCZr -TKjrvkwSqeqlqPKh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oNLwIZdXI+sIOfCG8EWzawyhPw9jb0X1 +jWv7rleUtleUSqe30gTWmtYcgeUxQnFH6ClWl2QlmYjOZ8iaX1UCZZ/JgzD20L4WnJ6xUQqnVHHbszhY +ZXDTff6fwVxav2awNWXsVen9rI9wAL3ryvxMHJ1ZVErLZm8/4aBGYfOyScF1Ckz/j0/Ue0+zRqV1iWxQ +oCi+CSPlA/0FDP9QAgAAAHjaVcwzQwQAAAXgL5tLWOKa3XqNWUvG2cafj8fp+WFITo+u3iHMU+ddhs3X +ebdxq3XeY9p2nfe2dfrMOqnz/jZ/zLjHOh/3KuZGUElQTlTKojNB1T99JiVty75rQWFFCW8d/qIt6zbd +C8rJi0pLNd1FAQGbTR1RUJBxbMOGDzlBbwqiSoI+pCUlpaXkrUvLCduQUfQuIerD51/nTVTKhpqgnLSN +//9vR8ImfAB42mNgZgCD/98YWIAUIwMaAAAu5AH+AAAAAAAB//8AAg== """)) POSITIONS = ( @@ -78,10 +77,10 @@ collage = Image.new("RGBA", (int(7.125*iconW), int(6.0*iconH))) collageDraw = ImageDraw.Draw(collage) # Draw collage -for postition, rgbString in zip(POSITIONS, colors): +for position, rgbString in zip(POSITIONS, colors): - x = int(postition[0] * iconW) - y = int(postition[1] * iconH) + x = int(position[0] * iconW) + y = int(position[1] * iconH) # Draw colorized icon addColor = ImageColor.getrgb("#" + rgbString + "00") diff --git a/gfx/luma_add/render.sh b/gfx/luma_add/render.sh index a2be88e..6248d3c 100755 --- a/gfx/luma_add/render.sh +++ b/gfx/luma_add/render.sh @@ -3,16 +3,16 @@ # Renders SVG files from ./path/file.svg to OUTDIR/path/file.tga # Overwrites existing tga files # -# USAGE -# ./render-svg.sh OUTDIR SVG... +# Usage: +# ./render.sh OUTDIR SVG... # -# EXAMPLES -# Single file: ./render.sh ~/.xonotic/data gfx/menu/luma/cursor.svg -# All files: ./render.sh ~/.xonotic/data $(find . -name "*.svg") +# Examples: +# One file: ./render.sh ~/.xonotic/data gfx/hud/luma/armor.svg +# All files: ./render.sh ~/.xonotic/data $(find . -name "*.svg") # -# DEPENDENCIES -# inkscape (0.92.3) -# imagemagick (7.0.7) +# Dependencies: +# Inkscape (0.92.3) +# ImageMagick (7.0.7) outDir="$1"; shift -- 2.39.2