using raster, vector, and web graphics - g-w learning · pdf filechapter introduces using...

Click here to load reader

Post on 06-Feb-2018




1 download

Embed Size (px)


  • Chapter 30 Using Raster, Vector, and Web Graphics AutoCAD and Its ApplicationsAdvanced 745Copyright by Goodheart-Willcox Co., Inc.

    Chapter Chapter

    Using Raster, Vector, and Web Graphics

    Learning ObjectivesAfter completing this chapter, you will be able to:

    Compare raster and vector fi les. Import and export raster fi les using AutoCAD. Import and export vector fi les using AutoCAD. Use image commands to manipulate inserted raster fi les. Create DWF, DWFx, and PDF fi les.

    One of the important aspects of drawing in AutoCAD is the ability to share infor-mation. Generally, this means sharing drawing data and geometry between CAD soft-ware, either AutoCAD software installed on other workstations or software other than AutoCAD. AutoCAD creates drawing data fi les in a format known as a vector fi le. However, you can also share your work, as images, with photo editing and desktop publishing software. In Chapters 16 through Chapter 19, you learned how to create realistic scenes and render them to fi les. A scene rendered to a fi le is a raster image. However, raster images used in AutoCAD do not have to be created in AutoCAD. They may also come from digital photographs, scanned images, or Internet sources. This chapter introduces using AutoCAD to work with raster and vector graphics fi les. This includes importing, exporting, and setting various parameters.

    Introduction to Raster and Vector Graphics

    In the world of electronic imaging, there are two basic types of fi lesraster and vector. AutoCAD drawings are called vector graphics. A vector is an object defi ned by XYZ coor-dinates. In other words, AutoCAD stores the mathematical defi nition of an object. Pixels(picture elements) are the dots or bits in the monitor that make up the display screen. When drawing vector objects in AutoCAD, your monitor uses pixels to create a representa-tion of the object on the monitor. However, there is no relationship between the physical pixels in your monitor and a vector object. Pixels simply show the object at the current zoom percentage. Some common vector fi le formats are DWG, DXF, AI, and EPS.

    Many illustrations created with drawing, painting, and presentation software are saved as raster fi les. A raster fi le creates a picture or image fi le using the location and color

    IInttroodduccctiioonn tto RRasster aannd Vecttoorr GGGraapphhicss

  • Chapter 30 Using Raster, Vector, and Web Graphics AutoCAD and Its ApplicationsAdvanced 746Copyright by Goodheart-Willcox Co., Inc.

    of the screen pixels. In other words, a raster fi le is made up of dots. Raster fi les are usually called bitmaps. There are several types of raster fi les used for presentation graphics and desktop publishing. Some common raster fi le formats include TIFF, JPEG, and GIF.

    Working with Raster Files

    Raster images inserted into AutoCAD drawings are treated much like externally referenced drawings (xrefs). Therefore, they are managed in the External Referencespalette. See Figure 30-1. This can be displayed with the EXTERNALREFERENCEScommand or by picking the dialog box launcher button at the lower-right corner of the Reference panel on the Insert tab of the ribbon.

    Raster images are not added to the drawing database, but are attached and refer-enced by a path to the fi les location. Any changes to the image content must be made to the original fi le. Settings and commands in AutoCAD can, however, control the portion of the image shown and its appearance. Images can be inserted, removed, and modifi ed using commands found in the Reference panel in the Insert tab of the ribbon, Figure 30-2. These functions are discussed in detail in this section.

    At the top of the External References palette is a drop-down list containing buttons for attaching drawing fi les (DWG fi les), image fi les, DWF fi les, DGN fi les, and PDF fi les. The File References area lists all fi les currently attached to the drawing, whether they

    WWoorrkkingg wwiith RRastter FFillees














    Figure 30-1.The External References palette is used to manage attached images. The tooltip can be configured to display only the file name, a preview, details, or both a preview and details, as shown here.

    Drop-down list for attaching drawings, images, and DWF files

    Pick toshow a list

    Pick to show a tree

    Hover to showdetails and a


    Details of theselected image

  • Chapter 30 Using Raster, Vector, and Web Graphics AutoCAD and Its ApplicationsAdvanced 747Copyright by Goodheart-Willcox Co., Inc.

    Figure 30-2.Image commands located on the Reference panel in the ribbon.

    Attaches images, andother file types

    Clips images

    Changes brightness,fading, and contrast

    Pick to display theExternal References palette

    are drawings, images, or DWF, DGN, or PDF fi les. Right-clicking on an entry displays a shortcut menu that allows you to open, attach, unload, reload, and detach the fi le. If you hover the cursor over an entry in the palette, a preview window is displayed. By default, this preview provides details related to the fi le and a preview of the fi le.

    There are many different types of raster fi les. Some raster fi les used in industry today are:

    Tagged Image File Format (TIFF). A fi le format developed by Aldus Corporation and Microsoft Corporation. This is one of the most commonly used image fi le types.

    Joint Photographic Experts Group (JPEG). A highly compressed graphics image fi le. This type of fi le is very common on websites. Also known as a JPG fi le.

    Graphics Interchange Format (GIF). A fi le format developed to allow the exchange of graphic images over an online computer service, such as the Internet. This type of fi le, often animated, is sometimes found on websites.

    Portable Network Graphics (PNG). Developed in the mid 1990s as a replace-ment for the GIF format. This fi le type is extensively used for electronic trans-mission, such as via e-mail or as website graphics.

    Other raster fi le types can also be imported into AutoCAD. If you have a raster image that cannot be directly imported, you will need to fi rst import the fi le into a paint or draw program. Then, export the image in a format that AutoCAD can read.

    Inserting Raster ImagesThe IMAGEATTACH command is used to attach an image fi le to a drawing. When

    the command is selected, the Select Reference File dialog box is displayed. Next, navi-gate to the folder containing the raster fi le, select the fi le, and pick Open. This displays the Attach Image dialog box, Figure 30-3. When the OK button is picked and the image placed, it is displayed in the drawing area. See Figure 30-4.

    The image name is displayed at the top of the dialog box. You can choose to save the full path, a relative path, or no path. The type of path is selected in the Path type drop-down list.

    A full path specifi es the complete location of the image fi le, such as c:\images\building.tif. If the image fi le is moved from this location, AutoCAD cannot fi nd it.

    A relative path specifi es the location of the image fi le based on the location of the drawing fi le. For example, the path .\images tells AutoCAD that the image fi le is located in a subfolder (named images) of the folder where the drawing is located. The entry ..\images tells AutoCAD to look for the fi le by moving up one folder from where the drawing is stored and then in the subfolder \images. The entry ..\..\images tells AutoCAD to move up two folders and then look in the subfolder \images. The current drawing must be saved in order to specify a relative path.


    Insert > Reference










  • Chapter 30 Using Raster, Vector, and Web Graphics AutoCAD and Its ApplicationsAdvanced 748Copyright by Goodheart-Willcox Co., Inc.

    Figure 30-3.The image name and path are displayed in the Attach Image dialog box. Be sure to select the type of path to use. The dialog box expands to include the Image Information area when the Show Details button is picked.


    Paththat willbe saved

    Picking this button toggles thedisplay of the lower portion

    Select thetype of path

    Figure 30-4.The raster image attached to an AutoCAD drawing.

  • Chapter 30 Using Raster, Vector, and Web Graphics AutoCAD and Its ApplicationsAdvanced 749Copyright by Goodheart-Willcox Co., Inc.

    The no path option tells AutoCAD that the image is located in the same folder as the drawing. If the image fi le is not found in that folder, AutoCAD looks in the path specifi ed by the PROJECTNAME system variable, then in the support fi le search path defi ned in the Files tab of the Options dialog box.

    The path to the image fi le is displayed at the bottom of the Image Information area. Also displayed is the path that will be saved in the drawing. The Image Informationarea is displayed by picking the Show Details button at the bottom of the dialog box.

    You can preset image parameters (insertion point, scale, and rotation) or choose to specify them on-screen. Image resolution information is displayed in the Image Information area of the expanded dialog box. Refer to Figure 30-3.


    If you are working on a project that uses xrefs and attached images, adding a project subfolder below the folder where the drawings are stored may be benefi cial. Then, use relative paths when inserting images or xrefs. This allows all related fi les for a project to be found by AutoCAD, even if the folder structure is moved to a different drive or root folder.


View more