Photo_Editor_Application.GraphicsComponent Class
Abstract Component class. Every graphic primitive and picture has to derive from this class. It provides the common interfaces the application can use.

Access: Public
Base Classes: Object
  Members Description  
    GraphicsComponent Constructor, initializes the start and end point of each primitive to be the origin.

 
    Draw Abstract method to be implemented by the derived classes to draw the corresponding primitive into the drawing surface.

 
    Add Method to add a component to the list of components. Default behavior is to do nothing.

 
    Remove Method to remove a component to the list of components. Default behavior is to do nothing.

 
    DeviceContext Accessor method for the static deviceContext field which holds the graphics reference of the drawing surface.

 
    deviceContext Holds the drawing surface.

 
    StartPoint Accessor method for the coordinates of the upper left corner of the primitive, or the start point of a line.

 
    EndPoint Accessor method for the coordinates of the lower right hand corner of the primitive, or the end point of a line.

 
    CalcViewportCoords Calculates the coordinates within the display window from a point relative to the image.

 
    ViewportCoords Set method for the coordinates of the image within the display window.

 
    IsPicked Checks if component is picked. Default implementation checks if start or end point is picked.

 
    endPoint    
    startPoint    
    viewportCoords