Z-order

from Wikipedia, the free encyclopedia

Z-order ( English Z-order , also Z-order ) is the order of overlapping two-dimensional objects, like windows in graphical user interfaces or shapes in vector graphics programs . One of the characteristics of typical user interfaces is that windows can overlap each other. The Z-order then determines which one appears above the other.

definition

The term “Z-order” refers to the order of objects along the Z-axis . In analytical geometry , “X” usually refers to the horizontal axis (“left or right”), “Y” to the vertical axis (“below or above”) and Z to the axis perpendicular to the other two (“front or behind "). The windows of a user interface can be thought of as a series of faces parallel to the surface of the screen. The windows are then stacked along the Z-axis and the Z-order defines the sorting of the windows from front to back.

use

In general, three-dimensional objects cannot be sorted in this way. For example, it is possible to arrange three pencils on a table so that the tip of each pencil rests on the back of another pencil. Neither of the pins is then on top of the other because they all overlap each other. This cannot happen with windows in a user interface because each window is parallel to the screen and thus all of its points have the same depth . The windows can therefore be stacked in a defined order.

Usually, users of a graphical user interface can influence the Z-order by selecting a window to bring it to the foreground (ie "above" or "in front of" all other windows). Some window managers also allow interaction with windows that are not in the foreground, while others always bring a window to the foreground when it receives user input. Special windows can be marked as "always on top". These are then attached to the top of the Z-order so that (with a few exceptions) no other window can overlay them.

When manipulating visible objects on a computer screen, an object with a Z-order of 1 would be below an object with a Z-order of 2 or more. This corresponds to creating layers of objects, with the Z-order determining which object lies on top of another. An HTML page can use the CSS property “z-index” in the div element to set the z-order so that objects can be superimposed on others.

See also

  • Z-Buffer , a method for calculating the occlusion of three-dimensional objects.
  • Z-curve , a space-filling curve that is used in computer science for multi-dimensional data structures.

Web links

  • John Zukowski: Let There Be Z-Order. In: Core Java Technologies Tech Tips. Archived from the original on April 8, 2009 ; accessed on August 25, 2008 .

Individual evidence

  1. CSS / Properties / Positioning in the SELFHTML Wiki