Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sketcher: update XPM icon for PointOnPoint constraint
The SVG icon was changed in d3ee556 but the small XPM icon was not modified. Unlike other XPM icons which are used in `ViewProviderSketch.cpp`, this `PointOnPoint` XPM icon doesn't seem to be used at all. Nevertheless, we still update it so that the XPM matches its corresponding SVG. Also update the `README.md` to explain how these XPM icons are generated.
- Loading branch information
1 parent
7069d9a
commit 884cbe8
Showing
2 changed files
with
56 additions
and
34 deletions.
There are no files selected for viewing
49 changes: 24 additions & 25 deletions
49
src/Mod/Sketcher/Gui/Resources/icons/small/Constraint_PointOnPoint_sm.xpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
/* XPM */ | ||
static char * Constraint_PointOnPoint_sm_xpm[] = { | ||
"16 16 7 1", | ||
" c None", | ||
". c #991515", | ||
"+ c #E11D1D", | ||
"@ c #9A1414", | ||
"# c #E21D1D", | ||
"$ c #CC0000", | ||
"% c #9B1414", | ||
" ", | ||
" ", | ||
" ", | ||
" ", | ||
" ", | ||
" ", | ||
" .++@ ", | ||
" #$$# ", | ||
" #$$# ", | ||
" @++% ", | ||
" ", | ||
" ", | ||
" ", | ||
" ", | ||
" ", | ||
" "}; | ||
static char *Constraint_PointOnPoint_sm_xpm[] = { | ||
/* columns rows colors chars-per-pixel */ | ||
"16 16 3 1 ", | ||
" c None", | ||
". c #D71414", | ||
"+ c #AA1919", | ||
/* pixels */ | ||
" ", | ||
" + + ", | ||
" +.+ +.+ ", | ||
" +.+ +.+ ", | ||
" + + ", | ||
" ++++ ", | ||
" +....+ ", | ||
" +...++ ", | ||
" +..+++ ", | ||
" +.++.+ ", | ||
" ++++ ", | ||
" + + ", | ||
" +.+ +.+ ", | ||
" +.+ +.+ ", | ||
" + + ", | ||
" " | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,47 @@ | ||
To create an XPM file from an SVG file, you need the ImageMagick libraries. | ||
Then run | ||
``` | ||
convert file.svg -geometry 16x16 -colors 16 file_sm.xpm | ||
convert file.svg -geometry 16x16 -colors 8 file_sm.xpm | ||
``` | ||
|
||
The XPM icon is very small, 16x16 px in size, and you usually don't need | ||
more than 16 colors. | ||
The XPM icon is very small, 16x16 px in size, and we usually don't need | ||
more than 8 colors. | ||
|
||
Edit the xpm file manually to do small retouches, for example, setting up | ||
the transparency and reducing the number of colors exactly to the desired ones. | ||
|
||
An XPM image has a header that defines the number of columns, number of rows, | ||
number of colors, and number of characters per pixel. | ||
The first rows have the colors definition, so they must match the number | ||
of colors, while the rest corresponds to the actual bitmap image. | ||
|
||
The space character (empty) can be set to the color `None`, | ||
to indicate transparency. | ||
|
||
``` | ||
/* XPM */ | ||
static char * file_sm_xpm[] = { | ||
"16 16 7 1", | ||
" c None", | ||
". c #BB1616", | ||
"+ c #DE1515", | ||
"@ c #BE1616", | ||
static char *file_sm_xpm[] = { | ||
/* columns rows colors chars-per-pixel */ | ||
"16 16 3 1 ", | ||
" c None", | ||
". c #D71414", | ||
"+ c #AA1919", | ||
/* pixels */ | ||
" ", | ||
" + + ", | ||
" +.+ +.+ ", | ||
" +.+ +.+ ", | ||
" + + ", | ||
" ++++ ", | ||
" +....+ ", | ||
" +...++ ", | ||
" +..+++ ", | ||
" +.++.+ ", | ||
" ++++ ", | ||
" + + ", | ||
" +.+ +.+ ", | ||
" +.+ +.+ ", | ||
" + + ", | ||
" " | ||
}; | ||
``` |