Sketcher: update XPM icon for PointOnPoint constraint
The SVG icon was changed in d3ee556467 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.
This commit is contained in:
@@ -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 */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .++@ ",
|
||||
" #$$# ",
|
||||
" #$$# ",
|
||||
" @++% ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
" + + ",
|
||||
" +.+ +.+ ",
|
||||
" +.+ +.+ ",
|
||||
" + + ",
|
||||
" ++++ ",
|
||||
" +....+ ",
|
||||
" +...++ ",
|
||||
" +..+++ ",
|
||||
" +.++.+ ",
|
||||
" ++++ ",
|
||||
" + + ",
|
||||
" +.+ +.+ ",
|
||||
" +.+ +.+ ",
|
||||
" + + ",
|
||||
" "
|
||||
};
|
||||
|
||||
@@ -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 */
|
||||
" ",
|
||||
" + + ",
|
||||
" +.+ +.+ ",
|
||||
" +.+ +.+ ",
|
||||
" + + ",
|
||||
" ++++ ",
|
||||
" +....+ ",
|
||||
" +...++ ",
|
||||
" +..+++ ",
|
||||
" +.++.+ ",
|
||||
" ++++ ",
|
||||
" + + ",
|
||||
" +.+ +.+ ",
|
||||
" +.+ +.+ ",
|
||||
" + + ",
|
||||
" "
|
||||
};
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user