1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
|
Frequently Asked Questions about Sketch
=======================================
1 About Sketch
1.1 What is Sketch?
1.2 Why would I want to use Sketch? I have GIMP!
1.3 Where can I find out more about Sketch?
1.4 Which Platforms does Sketch work on?
2 Troubleshooting
2.1 I get the error message "ImportError: No module named Image"
2.2 The window resizes when I drag the mouse or change the selection
3 Using Sketch
3.1 How do I import a PostScript or EPS file?
3.2 How do I export a drawing as EPS?
3.3 How do I close a curve or polygon?
3.4 How do I rotate an object by a precise angle?
3.5 Is there a command line tool to convert sk-files to PostScript?
4 Miscellaneous
4.1 Why doesn't Sketch have support for <some cool feature>?
4.2 Which font formats are supported?
4.3 Why doesn't Sketch support TrueType fonts?
4.4 Can I input text in ISO-Latin-2 or some other encoding?
4.5 Is there a Windows version or is one planned?
1 About Sketch
==============
1.1 What is Sketch?
-------------------
Sketch is an interactive vector drawing program for GNU/Linux and other
UNIX compatible systems. Sketch is implemented almost completely in
Python, a very high-level, object oriented, interpreted language, with
the rest written in C for speed.
1.2 Why would I want to use Sketch? I have GIMP!
------------------------------------------------
Sketch is a vector drawing program. That means a Sketch drawing is made
up of shapes like rectangles, ellipses and curves that can be filled
and stroked. Each object is represented by the mathematical description
of its shape, e.g. for a circle they're the coordinates of the center
point and the length of the radius. Because of this, vector drawings
can be scaled without quality loss and it's very easy to change parts
of a drawing.
GIMP, on the other hand, is an image manipulation program. A GIMP image
is made up of thousands of pixels and apart from layers has no inner
structure. This representation has the advantage that you can easily
have a lot of fine detail because each pixel can have a different
color, but after you e.g. have drawn a line, all you have is pixels.
You can't easily change the position or length or color of the line
after you've drawn it. Furthermore, a raster image is always designed
with one particular resolution in mind and scaling it often reduces its
quality.
Both kinds of graphics programs have their strengths and weaknesses and
for some purposes an image manipulation program is the appropriate tool
while for others it's the vector drawing program and often you'll need
both.
1.3 Where can I find out more about Sketch?
-------------------------------------------
The best place to go for information about Sketch is its web-page at
URL:http://sketch.sourceforge.net/.
1.4 Which Platforms does Sketch work on?
----------------------------------------
The feedback I've got so far about other platforms indicates that
Sketch runs on these platforms too:
- GNU/Linux on i386, Alpha, m68k, PowerPC and Sparc
- FreeBSD
- Solaris 2.5.1, 2.6, 2.7
- IRIX64 6.4
- AIX
2 Troubleshooting
=================
2.1 I get the error message "ImportError: No module named Image"
----------------------------------------------------------------
This message usually means that the Python Imaging Library (PIL) is not
installed on your system, so the solution is to install it.
URLs for the sources and rpms can be found on Sketch's web-page (see
FAQ 1.3) and in the INSTALL file. Some Linux distributions already
contain a suitable version of PIL although in some cases they're a bit
buggy.
SuSE Linux 6.2, 6.3 and 6.4, for instance, have a PIL-package, but it's
slightly broken. The file /usr/lib/python1.5/site-packages/PIL.pth is
missing. To fix this, create that file with just the line 'PIL' in it
(without the quotes). (the purpose and syntax of *.pth files is
described in /usr/lib/python1.5/site.py)
2.2 The window resizes when I drag the mouse or change the selection
--------------------------------------------------------------------
The frequent resizes are caused by the changing texts in the status
bar. The best solution is to either use the "--geometry" command line
option to set the size of the main window or to put an entry like
"sketch.geometry: 900x680" into your .Xdefaults file.
3 Using Sketch
==============
3.1 How do I import a PostScript or EPS file?
---------------------------------------------
That depends on what you want to do exactly.
If you want to embed an EPS file as a whole into a Sketch drawing, just
treat it like a raster image, i.e. use the menu command
Edit->Create->Load Image file or use the corresponding toolbar button
which is the rightmost one.
In this case, you get an EPS-object which Sketch displays with a
preview image rendered by ghostscript. It behaves very much like a
raster image, but when you output your drawing as a postscript file,
the EPS' postscript code is copied to the output file.
If you want to import your postscript file because you want to edit its
contents, to change fill colors for example, you can in some
circumstances use the normal file loading commands, i.e. File->Open or
File->Insert Document, to achieve this. It only works if the file is
actually an Illustrator file.
For other postscript files, have a look at pstoedit
(URL:http://www.geocities.com/SiliconValley/Network/1958/pstoedit/). It
uses ghostscript to interpret arbitrary postscript files and can write
several vector file formats, including Sketch's own sk-format.
3.2 How do I export a drawing as EPS?
-------------------------------------
Just print into a file or use File->Save as PostScript in the menu.
Sketch always generates EPS files. You don't have to do anything
special.
3.3 How do I close a curve or polygon?
--------------------------------------
In edit mode, select both end points and invoke the menu command
Curve->Close Nodes.
3.4 How do I rotate an object by a precise angle?
-------------------------------------------------
Sketch doesn't have a dialog for this yet, but if you want to rotate it
by a multiple of 15 degrees, just hold control while rotating the
object interactively.
3.5 Is there a command line tool to convert sk-files to PostScript?
-------------------------------------------------------------------
Sketch comes with a script called sk2ps that does just that. It's
automatically installed alongside Sketch and can even read all the file
formats Sketch can read.
4 Miscellaneous
===============
4.1 Why doesn't Sketch have support for <some cool feature>?
------------------------------------------------------------
Depending on what the feature in question is, there are several
possible answers.
The most common reason is simply that nobody has written it yet. There
are many useful features that Sketch should have, but currently there's
only one Programmer writing code and that severely limits what gets
implemented and how fast.
Of course, not every feature is useful or fits well with the goals of
the Sketch project. However, I hope to make Sketch flexible and
extensible enough to accommodate such features with plugins and user
scripts.
See also the FAQs about TrueType fonts (4.3) and text encodings (4.4)
4.2 Which font formats are supported?
-------------------------------------
Currently, Sketch supports only Type 1 fonts.
4.3 Why doesn't Sketch support TrueType fonts?
----------------------------------------------
Well, font-handling under Linux/Unix/X is pretty complex. Applications
have to do a lot of things themselves that should be provided by the
'system' (whatever that means). So it's simply a lot of work and I went
the easy route and support only Type1 fonts because X can render them
even without any special setup and printing them is no problem because
it's the native PostScript font format.
Now, with FreeType and XFree 4.0, supporting TrueType fonts will become
much easier and Sketch will support them one day.
You may also want to have a look at the CurveText extension or the
JapaneseText extension which let you create bezier objects based on
TrueType fonts. Both extensions are available through the add-on page
(URL:http://sketch.sourceforge.net/addon.html)
4.4 Can I input text in ISO-Latin-2 or some other encoding?
-----------------------------------------------------------
Unfortunately, no. At least not in the 0.6 stable releases.
Adding proper support for that would require a lot more work than I
want to do for 0.6.x. It would require changes to the way events are
handled, text objects would have to know about encodings and the
post-script output code as well, and it would require changes to the
file format.
That having been said, one of the goals of the current developer
series, 0.7, is better text support including better support for
encodings other than ISO-Latin-1. One of the first steps will probably
be to switch to unicode internally.
When I added text support to Sketch, I simply chose the most simple way
to handle encodings that would suffice for my needs and that's Latin-1
and some support for font-specific encodings for symbol fonts. I knew
of course that this wouldn't be enough in the long run, especially with
respect to non-latin scripts and multi-byte character sets, but having
a simple implementation that works for many users is always better than
to have no usable code because the project gets bogged down in a too
complex design, IMO, especially in an open source project.
4.5 Is there a Windows version or is one planned?
-------------------------------------------------
(The following is a bit outdated as some work has been done for a
windows port, see the mailing list archives
(URL:http://www.geocrawler.com/archives/3/5016/2001/8/0/) for
July/August 2001)
Currently, No, and there aren't plans to do one either at the moment.
There is some demand for a Windows version of Sketch, but I've got
enough to do with the GTK port and I don't need the port myself, so I
probably won't be doing it myself. What it takes is someone who starts
and maintains it.
There are several ways to do such a port. The most difficult or at
least time consuming part is probably the user interface, but there are
also some Unixisms in the code, such as opening binary files without
the "b" flag and the extension modules would have to be modified in
some minor way to get them to work with VC++.
Even though Tkinter does work on Windows, the stable Tkinter based
version (0.6.x) doesn't work on Windows because it accesses Xlib
directly to draw the mainwindow. That would have to ported in some way.
The GTK based versions (0.7.x) might provide a better way to get Sketch
working on Windows. There is a Windows port of GTK, but I don't know
how stable that really is (although Gimp seems to be quite stable now,
from what I read) and how well pygtk works with it.
The code of the GTK version is also much better divided into Toolkit
specific code and more abstract interaction code than in 0.6.x, so it
might even be feasible to have a non-GTK interface in the Windows
version.
|