Application programming interfaces for graphics, or APIs, grant programmers interaction …show more content…
Without these capabilities, a library would be too limited for a developer to achieve realistic processing that the simplest graphical applications demand. At the very core of all libraries is the capacity to draw shapes and primitives such as points, lines, curves, circles, rectangles, and polygons. These objects require placement at a specific point relative to the origin of the plane on which they are drawn, also known as translation. Rotation “turns” an object by a distinct angle about a point that can exist inside or outside of the object. Scaling resizes an object, and in most cases, the individual axes can be resized independently, which is also known as skewing (Ulrich, 2012). Translation, rotation, and scaling are subsets or a more general term known as transformation (2D transformations, n.d.). Transformation can be simple, like the methods previously mentioned, or significantly more complex. Generally, geometric objects allow filling or painting to change its background characteristics. The C/C++ Direct2D API caters functions that implement all of these capabilities including:
• DrawLine – draws a line between two points
• DrawEllipse and FillEllipse – draws the outline or fills an ellipses (including circles) respectively.
• DrawGeometry and FillGeometry – draws the outline or fills more complex geometric shapes which include curves and polygons.
• DrawRectangle and FillRectangle