Tutorial | 基本 這篇教學示範 Inkscape 的基本使用。本文是標準的 Inkscape 文件,所以你可以觀看、編輯、複製內容或儲存。 The Basic Tutorial covers canvas navigation, managing documents, shape tool basics, selection techniques, transforming objects with selector, grouping, setting fill and stroke, alignment, and z-order. For more advanced topics, check out the other tutorials in the Help menu. 平移畫布 There are many ways to pan (scroll) the document canvas. Try Ctrl+arrow keys to scroll by keyboard. (Try this now to scroll this document down.) You can also drag the canvas by the middle mouse button. Or, you can use the scrollbars (press Ctrl+B to show or hide them). The wheel on your mouse also works for scrolling vertically; press Shift with the wheel to scroll horizontally. 縮放畫面 The easiest way to zoom is by pressing - and + (or =) keys. You can also use Ctrl+middle click or Ctrl+right click to zoom in, Shift+middle click or Shift+right click to zoom out, or rotate the mouse wheel with Ctrl. Or, you can click in the zoom entry field (in the bottom right corner of the document window), type a precise zoom value in %, and press Enter. We also have the Zoom tool (in the toolbar on left) which lets you to zoom into an area by dragging around it. Inkscape also keeps a history of the zoom levels you've used in this work session. Press the ` key to go back to the previous zoom, or Shift+` to go forward. Inkscape 工具 於左側的垂直工具列陳列著 Inkscape 的繪製和編輯工具。在視窗頂端、選單的下面,有包括一般命令按鈕的命令列和每個工具特性控制的工具控制列。位於視窗底部的狀態列在你使用時會顯示有用的提示和訊息。 Many operations are available through keyboard shortcuts. Open HelpKeys and Mouse Reference to see the complete reference. 建立和管理文件 To create a new empty document, use FileNew or press Ctrl+N. To create a new document from one of Inkscape's many templates, use FileNew from Template… or press Ctrl+Alt+N To open an existing SVG document, use FileOpen (Ctrl+O). To save, use FileSave (Ctrl+S), or FileSave As (Shift+Ctrl+S) to save under a new name. (Inkscape may still be unstable, so remember to save often!) Inkscape 使用 SVG (可縮放向量圖形) 格式作為檔案格式。SVG 是一個開放的標準,被圖形軟體廣泛地支援。SVG 檔案基於 XML 並且可藉由任何的文字或 XML 編輯器進行編輯 (Inkscape 以外的軟體)。除了 SVG 外,Inkscape 可以匯入和匯出幾種其他格式 (EPS、PNG)。 Inkscape opens a separate document window for each document. You can navigate among them using your window manager (e.g. by Alt+Tab), or you can use the Inkscape shortcut, Ctrl+Tab, which will cycle through all open document windows. (Create a new document now and switch between it and this document for practice.) Note: Inkscape treats these windows like tabs in a web browser, this means the Ctrl+Tab shortcut only works with documents running in the same process. If you open multiple files from a file browser or launch more than one Inkscape process from an icon it will not work. 建立形狀 學習製作一些漂亮的形狀!點擊在工具列上的矩形工具 (或按 F4) 然後在一個新的空白文件或這裡點擊並拖曳: 如你所見,預設矩形為藍色,帶有黑色 邊框 (輪廓),而且完全不透明。下面內容我們將會見到如何去改變它。用其他工具,你也可以建立橢圓形、星形和螺旋形: 這些工具統稱為形狀工具。每個你建立的形狀會顯示一個或多個方塊形狀的控制點;試著拖動它們可見到形狀如何跟著變化。形狀工具的控制面板可用另一種方式來微調形狀;這些控制影響目前選擇的形狀 (即那些顯示的控制點) 並且將會套用到新建立形狀的預設情形。 To undo your last action, press Ctrl+Z. (Or, if you change your mind again, you can redo the undone action by Shift+Ctrl+Z.) 移動、縮放、旋轉 使用最頻繁的 Inkscape 工具就是選取器。點選工具列上最上面的按鈕 (箭頭),或者按 F1空白鍵。現在你可以在畫布上選取任何物件。點擊下面的矩形。 你會見到 8 個箭頭形狀的控制點出現在物件的四周。現在你可以: Move the object by dragging it. (Press Ctrl to restrict movement to horizontal and vertical.) Scale the object by dragging any handle. (Press Ctrl to preserve the original height/width ratio.) 現在再點一次矩形。控制點改變了。現在你可以: Rotate the object by dragging corner handles. (Press Ctrl to restrict rotation to 15 degree steps. Drag the cross mark to position the center of rotation.) Skew (shear) the object by dragging non-corner handles. (Press Ctrl to restrict skewing to 15 degree steps.) 當用選取器時,你也可以使用控制列上的數字輸入區來設定選取的坐標 (X 和 Y) 和大小 (寬和長) 的準確數值。 用按鍵改變物件 一個 Inkscape 的特色是除了大部份向量繪圖的特點以外還強調能用鍵盤完成所有設定。幾乎沒有任何命令和動作是鍵盤做不到的,改變物件也沒有例外。 You can use the keyboard to move (arrow keys), scale (< and > keys), and rotate ([ and ] keys) objects. Default moves and scales are by 2 px; with Shift, you move by 10 times that. Ctrl+> and Ctrl+< scale up or down to 200% or 50% of the original, respectively. Default rotates are by 15 degrees; with Ctrl, you rotate by 90 degrees. However, perhaps the most useful are pixel-sizetransformations, invoked by using Alt with the transform keys. For example, Alt+arrows will move the selection by 1 pixel at the current zoom (i.e. by 1 screen pixel, not to be confused with the px unit which is an SVG length unit independent of zoom). This means that if you zoom in, one Alt+arrow will result in a smaller absolute movement which will still look like one-pixel nudge on your screen. It is thus possible to position objects with arbitrary precision simply by zooming in or out as needed. Similarly, Alt+> and Alt+< scale selection so that its visible size changes by one screen pixel, and Alt+[ and Alt+] rotate it so that its farthest-from-center point moves by one screen pixel. Note: Linux users may not get the expected results with the Alt+arrow and a few other key combinations if their Window Manager catches those key events before they reach the inkscape application. One solution would be to change the WM's configuration accordingly. 多重選取 You can select any number of objects simultaneously by Shift+clicking them. Or, you can drag around the objects you need to select; this is called rubberband selection. (Selector creates rubberband when dragging from an empty space; however, if you press Shift before starting to drag, Inkscape will always create the rubberband.) Practice by selecting all three of the shapes below: Now, use rubberband (by drag or Shift+drag) to select the two ellipses but not the rectangle: 每個單獨的物件在選取範圍內會顯示選取標示 — 預設是一個矩形虛線框。這些標示使得容易一眼看出哪個被選取、哪個沒被選取。舉例來說,如果你選擇兩個橢圓形和一個矩形,沒有標示的情況下你會很難猜測橢圓形是否已被選取。 Shift+clicking on a selected object excludes it from the selection. Select all three objects above, then use Shift+click to exclude both ellipses from the selection leaving only the rectangle selected. Pressing Esc deselects any selected objects. Ctrl+A selects all objects in the current layer (if you did not create layers, this is the same as all objects in the document). 群組 幾個物件可結合為一個群組。一個群組於拖曳或變形時會表現得像單一個物件。下面左邊的三個物件是獨立的,而右邊相同的三個物件是已群組的。試著拖動這個群組看看。 To create a group, you select one or more objects and press Ctrl+G. To ungroup one or more groups, select them and press Ctrl+U. Groups themselves may be grouped, just like any other objects; such recursive groups may go down to arbitrary depth. However, Ctrl+U only ungroups the topmost level of grouping in a selection; you'll need to press Ctrl+U repeatedly if you want to completely ungroup a deep group-in-group. You don't necessarily have to ungroup, however, if you want to edit an object within a group. Just Ctrl+click that object and it will be selected and editable alone, or Shift+Ctrl+click several objects (inside or outside any groups) for multiple selection regardless of grouping. Try to move or transform the individual shapes in the group (above right) without ungrouping it, then deselect and select the group normally to see that it still remains grouped. 填色和邊框 Probably the simplest way to paint an object some color is to select an object, and click a swatch in the palette below the canvas to paint it (change its fill color). Alternatively, you can open the Swatches dialog from the View menu (or press Shift+Ctrl+W), select an object, and click a swatch to paint it (change its fill color). More powerful is the Fill and Stroke dialog from the Object menu (or press Shift+Ctrl+F). Select the shape below and open the Fill and Stroke dialog. 你會見到對話窗有三個分頁:填充、邊框顏色和邊框樣式。填充分頁讓你編輯選取物件的填色 (內部)。使用於分頁下面一點的按鈕可選擇填入類型,包括沒有填色 (有 X 圖案的按鈕)、純色填充、線性漸層或放射狀漸層。以上面的形狀來說,純色填充按鈕會是開啟的狀態。 更進一步你會看到顏色選擇器的集合在它們自己所屬的分頁中:RGB、CMYK、HSL和色環。色環選擇器大概是最方便的,你可以旋轉三角形來選擇色環上的色相,然後在三角形範圍裡選擇那個色相的明暗程度。所有顏色選擇器包含一個滑動拉桿可設定選取物件的 alpha 值(不透明度)。 每當你選擇一個物件,顏色選擇器會更新並顯示目前的填色和邊框 (若是多重選取,對話窗顯示是它們的平均顏色)。用這些樣品玩玩或建立你自己的: 使用邊框填塗分頁可以移除物件的邊框 (輪廓),或者指定任何顏色或透明度 : 最後一個分頁「邊框樣式」讓你設定寬度和邊框的其他參數: 最後,你可以用漸層色替代純色作為填色和(或)邊框顏色: When you switch from flat color to gradient, the newly created gradient uses the previous flat color, going from opaque to transparent. Switch to the Gradient tool (Ctrl+F1) to drag the gradient handles — the controls connected by lines that define the direction and length of the gradient. When any of the gradient handles is selected (highlighted blue), the Fill and Stroke dialog sets the color of that handle instead of the color of the entire selected object. Yet another convenient way to change a color of an object is by using the Dropper tool (F7). Just click anywhere in the drawing with that tool, and the picked color will be assigned to the selected object's fill (Shift+click will assign stroke color). 再製、對齊、分佈 One of the most common operations is duplicating an object (Ctrl+D). The duplicate is placed exactly above the original and is selected, so you can drag it away by mouse or by arrow keys. For practice, try to fill the line with copies of this black square: Chances are, your copies of the square are placed more or less randomly. This is where the Align and Distribute dialog (Shift+Ctrl+A) is useful. Select all the squares (Shift+click or drag a rubberband), open the dialog and press the “Center on horizontal axis” button, then the “Make horizontal gaps between objects equal” button (read the button tooltips). The objects are now neatly aligned and distributed equispacedly. Here are some other alignment and distribution examples: 排列順序 The term z-order refers to the stacking order of objects in a drawing, i.e. to which objects are on top and obscure others. The two commands in the Object menu, Raise to Top (the Home key) and Lower to Bottom (the End key), will move your selected objects to the very top or very bottom of the current layer's z-order. Two more commands, Raise (PgUp) and Lower (PgDn), will sink or emerge the selection one step only, i.e. move it past one non-selected object in z-order (only objects that overlap the selection count, based on their respective bounding boxes). 以反向順序排列下面的物件來練習這些指令,所以最左邊的橢圓形在頂層而最右邊那個在底層: A very useful selection shortcut is the Tab key. If nothing is selected, it selects the bottommost object; otherwise it selects the object above theselected object(s) in z-order. Shift+Tab works in reverse, starting from the topmost object and proceeding downwards. Since the objects you create are added to the top of the stack, pressing Shift+Tab with nothing selected will conveniently select the object you created last. Practice the Tab and Shift+Tab keys on the stack of ellipses above. 選取下方物件和拖曳選取物件 如果你需要的物件隱藏在其他物件背後,該怎麼辦?如果上層物件 (可能) 是透明的,你仍然可看見底層的物件,但是在它上面點擊會選取到上層的物件 (你不需要的那個)。 This is what Alt+click is for. First Alt+click selects the top object just like the regular click. However, the next Alt+click at the same point will select the object below the top one; the next one, the object still lower, etc. Thus, several Alt+clicks in a row will cycle, top-to-bottom, through the entire z-order stack of objects at the click point. When the bottom object is reached, next Alt+click will, naturally, again select the topmost object. [If you are on Linux, you might find that Alt+click does not work properly. Instead, it might be moving the whole Inkscape window. This is because your window manager has reserved Alt+click for a different action. The way to fix this is to find the Window Behavior configuration for your window manager, and either turn it off, or map it to use the Meta key (aka Windows key), so Inkscape and other applications may use the Alt key freely.] This is nice, but once you selected an under-the-surface object, what can you do with it? You can use keys to transform it, and you can drag the selection handles. However, dragging the object itself will reset the selection to the top object again (this is how click-and-drag is designed to work — it selects the (top) object under cursor first, then drags the selection). To tell Inkscape to drag whatis selected now without selecting anything else, use Alt+drag. This will move the current selection no matter where you drag your mouse. Practice Alt+click and Alt+drag on the two brown shapes under the green transparent rectangle: 選取相似物件 Inkscape can select other objects similar to the object currently selected. For example, if you want to select all the blue squares below first select one of the blue squares, and use EditSelect SameFill Color from the menu. All the objects with a fill color the same shade of blue are now selected. 除了依照填色選取外,你也可以依照邊框顏色、邊框樣式、填色 & 邊框、物件類型來選取多個相似物件。 結論 This concludes the Basic tutorial. There's much more than that to Inkscape, but with the techniques described here, you will already be able to create simple yet useful graphics. For more complicated stuff, go through the Advanced and other tutorials in HelpTutorials. Bulia Byak; Jonathan Leighton; Ralf Stephan; Bryce Harrington; Alexandre Prokoudine; Colin Marquardt; Josh Andler; Nicolas Dufour; Gellért Gyuris Dong-Jun Wu — 2009, 2014, 2016 Esteban Capella — 2019