egami
C++ Image Processing program
Public Member Functions | Private Attributes | Friends
Image_unit Class Reference

Display facility of an Image. More...

#include <display_unit.hpp>

Inheritance diagram for Image_unit:
Inheritance graph
[legend]
Collaboration diagram for Image_unit:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Image_unit (const std::string &filepath, bool mod=true)
 Constructs an image from a file and initialize the unit.
 Image_unit (const Image_unit *from, unsigned height, unsigned width, bool mod=true)
 Image_unit (const Image_unit &other)
 Image_unit (Image_unit &&other) noexcept
Image_unitoperator= (Image_unit other) noexcept
virtual bool on_draw (const Cairo::RefPtr< Cairo::Context > &context)
 Draws the image on a Cairo::Context.
bool modifiable () const
 Is the unit usable as source of a processing.
void redraw ()
bool save () const
void save_as (const std::string &) const
std::string get_path () const
void set_page (const Display_page *)
std::tuple< int, int, int, int > selection () const

Private Attributes

const Display_pagepage
Cairo::RefPtr
< Cairo::ImageSurface > 
image_surface
Cairo::RefPtr< Cairo::Context > image_context
bool is_modifiable
std::string filepath

Friends

void swap (Image_unit &lhs, Image_unit &rhs) noexcept

Detailed Description

Display facility of an Image.

Definition at line 49 of file display_unit.hpp.


Constructor & Destructor Documentation

Image_unit::Image_unit ( const std::string &  filepath,
bool  mod = true 
) [explicit]

Constructs an image from a file and initialize the unit.

Parameters:
filepaththe path to the image file

Definition at line 15 of file display_unit.cpp.

Here is the call graph for this function:

Image_unit::Image_unit ( const Image_unit from,
unsigned  height,
unsigned  width,
bool  mod = true 
) [explicit]

Definition at line 26 of file display_unit.cpp.

Here is the call graph for this function:

Image_unit::Image_unit ( const Image_unit other)

Definition at line 37 of file display_unit.cpp.

Here is the call graph for this function:

Image_unit::Image_unit ( Image_unit &&  other)

Definition at line 48 of file display_unit.cpp.


Member Function Documentation

std::string Image_unit::get_path ( ) const

Definition at line 108 of file display_unit.cpp.

Here is the caller graph for this function:

bool Image_unit::modifiable ( ) const [virtual]

Is the unit usable as source of a processing.

Implements Display_unit.

Definition at line 81 of file display_unit.cpp.

Here is the caller graph for this function:

bool Image_unit::on_draw ( const Cairo::RefPtr< Cairo::Context > &  context) [virtual]

Draws the image on a Cairo::Context.

This function is inherited from Gtk::DrawingArea, the signal connection is already done by gtkmm.

Parameters:
contextthe context to draw on

Definition at line 75 of file display_unit.cpp.

Image_unit & Image_unit::operator= ( Image_unit  other)

Definition at line 52 of file display_unit.cpp.

Here is the call graph for this function:

void Image_unit::redraw ( )

Definition at line 68 of file display_unit.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool Image_unit::save ( ) const [virtual]

Implements Display_unit.

Definition at line 85 of file display_unit.cpp.

Here is the call graph for this function:

void Image_unit::save_as ( const std::string &  fp) const [virtual]

Implements Display_unit.

Definition at line 98 of file display_unit.cpp.

Here is the call graph for this function:

std::tuple< int, int, int, int > Image_unit::selection ( ) const

Definition at line 116 of file display_unit.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void Image_unit::set_page ( const Display_page dp)

Definition at line 112 of file display_unit.cpp.


Friends And Related Function Documentation

void swap ( Image_unit lhs,
Image_unit rhs 
) [friend]

Definition at line 57 of file display_unit.cpp.


Member Data Documentation

std::string Image_unit::filepath [mutable, private]

Definition at line 92 of file display_unit.hpp.

Cairo::RefPtr<Cairo::Context> Image_unit::image_context [private]

The context on which the Image is drawn

Definition at line 89 of file display_unit.hpp.

Cairo::RefPtr<Cairo::ImageSurface> Image_unit::image_surface [private]

The surface containing the Image

Definition at line 88 of file display_unit.hpp.

bool Image_unit::is_modifiable [private]

Definition at line 91 of file display_unit.hpp.

const Display_page* Image_unit::page [private]

Definition at line 87 of file display_unit.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends