12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ectangle propertiesEraseMode{normal} | none | xor | backgroundErase mode. This property controls the technique <strong>MATLAB</strong> uses to draw anderase rectangle objects. Alternative erase modes are useful for creatinganimated sequences, where control of the way individual objects redraw isnecessary to improve performance and obtain the desired effect.• normal (the default) – Redraw the affected region of the display, performingthe three-dimensional analysis necessary to ensure that all objects arerendered correctly. This mode produces the most accurate picture, but is theslowest. The other modes are faster, but do not perform a complete redrawand are therefore less accurate.• none – Do not erase the rectangle when it is moved or destroyed. While theobject is still visible on the screen after erasing with EraseMode none, youcannot print it because <strong>MATLAB</strong> stores no information about its formerlocation.• xor – Draw and erase the rectangle by performing an exclusive OR (XOR)with the color of the screen beneath it. This mode does not damage the colorof the objects beneath the rectangle. However, the rectangle’s color dependson the color of whatever is beneath it on the display.• background – Erase the rectangle by drawing it in the Axes’ backgroundColor, or the Figure background Color if the Axes Color is set to none. Thisdamages objects that are behind the erased rectangle, but rectangles arealways properly colored.Printing with Non-normal Erase Modes.<strong>MATLAB</strong> always prints Figures as if the EraseMode of all objects is normal.This means graphics objects created with EraseMode set to none, xor, orbackground can look different on screen than on paper. On screen, <strong>MATLAB</strong>may mathematically combine layers of colors (e.g., XORing a pixel color withthat of the pixel behind it) and ignore three-dimensional sorting to obtaingreater rendering speed. However, these techniques are not applied to theprinted output.You can use the <strong>MATLAB</strong> getframe command or other screen captureapplication to create an image of a Figure containing non-normal mode objects.2-395

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!