GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions | Variables
graphics.cc File Reference
#include <cctype>
#include <cfloat>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <list>
#include <map>
#include <set>
#include <string>
#include <sstream>
#include "cmd-edit.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-locbuf.h"
#include "singleton-cleanup.h"
#include "builtins.h"
#include "cutils.h"
#include "defun.h"
#include "display.h"
#include "error.h"
#include "graphics.h"
#include "input.h"
#include "ov.h"
#include "oct-obj.h"
#include "oct-map.h"
#include "ov-fcn-handle.h"
#include "pager.h"
#include "parse.h"
#include "toplev.h"
#include "txt-eng-ft.h"
#include "unwind-prot.h"
#include "octave-default-image.h"
#include "graphics-props.cc"
Include dependency graph for graphics.cc:

Go to the source code of this file.

Classes

class  callback_event
 
class  function_event
 
class  set_event
 

Macros

#define CHECK_ARRAY_EQUAL(T, F, A)
 
#define CONVERT_CDATA_1(ARRAY_T, VAL_FN, IS_REAL)
 
#define FIX_LIMITS
 
#define GO_BODY(TYPE)
 

Functions

static void adopt (const graphics_handle &p, const graphics_handle &h)
 
int calc_dimensions (const graphics_object &go)
 
ColumnVector cam2xform (const Array< double > &m)
 
static void check_limit_vals (double &min_val, double &max_val, double &min_pos, double &max_neg, const octave_value &data)
 
static void cleanup_waitfor_id (uint32_t id)
 
static void cleanup_waitfor_postset_listener (const octave_value &listener)
 
static void cleanup_waitfor_predelete_listener (const octave_value &listener)
 
static void close_figure (const graphics_handle &handle)
 
static bool compare_property_values (const octave_value &o1, const octave_value &o2)
 
static octave_value convert_cdata (const base_properties &props, const octave_value &cdata, bool is_scaled, int cdim)
 
template<class T >
void convert_cdata_1 (bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, const T *cv, octave_idx_type lda, octave_idx_type nc, double *av)
 
static void convert_cdata_2 (bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, double x, octave_idx_type lda, octave_idx_type nc, octave_idx_type i, double *av)
 
static double convert_font_size (double font_size, const caseless_str &from_units, const caseless_str &to_units, double parent_height=0)
 
static ColumnVector convert_label_position (const ColumnVector &p, const text::properties &props, const graphics_xform &xform, const Matrix &bbox)
 
static octave_value convert_linestyleorder_string (const octave_value &val)
 
static Matrix convert_position (const Matrix &pos, const caseless_str &from_units, const caseless_str &to_units, const Matrix &parent_dim)
 
static Matrix convert_text_position (const Matrix &pos, const text::properties &props, const caseless_str &from_units, const caseless_str &to_units)
 
static octave_value convert_ticklabel_string (const octave_value &val)
 
ColumnVector cross (const ColumnVector &v1, const ColumnVector &v2)
 
void cross_product (double x1, double y1, double z1, double x2, double y2, double z2, double &x, double &y, double &z)
 
static Matrix default_axes_outerposition (void)
 
static Matrix default_axes_position (void)
 
static Matrix default_axes_tick (void)
 
static Matrix default_axes_ticklength (void)
 
static Matrix default_axes_view (void)
 
static Matrix default_colororder (void)
 
static Matrix default_control_position (void)
 
static Matrix default_control_sliderstep (void)
 
static Matrix default_data (void)
 
static Matrix default_figure_paperposition (void)
 
static Matrix default_figure_papersize (void)
 
static Matrix default_figure_position (void)
 
static Matrix default_image_cdata (void)
 
static Matrix default_lim (bool logscale=false)
 
static Matrix default_panel_position (void)
 
static Matrix default_patch_faces (void)
 
static Matrix default_patch_vertices (void)
 
static Matrix default_patch_xdata (void)
 
static Matrix default_patch_ydata (void)
 
static double default_screendepth (void)
 
static double default_screenpixelsperinch (void)
 
static Matrix default_screensize (void)
 
static Matrix default_surface_cdata (void)
 
static Matrix default_surface_xdata (void)
 
static Matrix default_surface_ydata (void)
 
static Matrix default_surface_zdata (void)
 
static void delete_graphics_object (const graphics_handle &h)
 
static void delete_graphics_object (double val)
 
static void delete_graphics_objects (const NDArray vals)
 
static void do_cleanup_waitfor_listener (const octave_value &listener, listener_mode mode=POSTSET)
 
static Matrix do_translate (double x0, double x1, const Matrix &lims, bool is_logscale)
 
static Matrix do_zoom (double val, double factor, const Matrix &lims, bool is_logscale)
 
double dot (const ColumnVector &v1, const ColumnVector &v2)
 
OCTAVE_EXPORT octave_value_list F__calc_dimensions__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__get__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_axes__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_axes_init__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_delete__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_execute_callback__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_figure__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_figure_handles__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_handles__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_hggroup__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_image__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_line__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_patch__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_surface__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_text__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uicontextmenu__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uicontrol__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uimenu__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uipanel__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uipushtool__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uitoggletool__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uitoolbar__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__image_pixel_size__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__is_handle_visible__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__zoom__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Faddlistener (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Faddproperty (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits (const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list Fdellistener (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdrawnow (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fget (const octave_value_list &args, int)
 
static void finalize_r (const graphics_handle &h)
 
OCTAVE_EXPORT octave_value_list Fishandle (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits (const octave_value_list &, int)
 
static void force_close_figure (const graphics_handle &handle)
 
double force_in_range (double x, double lower, double upper)
 
OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Freset (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fset (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fwaitfor (const octave_value_list &args, int)
 
graphics_handle gca (void)
 
graphics_handle gcf (void)
 
template<class T >
static void get_array_limits (const Array< T > &m, double &emin, double &emax, double &eminp, double &emaxp)
 
void get_children_limits (double &min_val, double &max_val, double &min_pos, double &max_neg, const Matrix &kids, char limit_type)
 
static std::string get_graphics_object_type (double val)
 
octave_value get_property_from_handle (double handle, const std::string &property, const std::string &func)
 
static void gripe_set_invalid (const std::string &pname)
 
static void initialize_r (const graphics_handle &h)
 
static bool is_figure (double val)
 
static bool is_handle (const graphics_handle &h)
 
static bool is_handle (double val)
 
static octave_value is_handle (const octave_value &val)
 
static bool is_handle_visible (const graphics_handle &h)
 
static bool is_handle_visible (double val)
 
static octave_value is_handle_visible (const octave_value &val)
 
static Matrix jet_colormap (void)
 
static bool lookup_object_name (const caseless_str &name, caseless_str &go_name, caseless_str &rest)
 
static void magform (double x, double &a, int &b)
 
static octave_value make_graphics_object (const std::string &go_name, bool integer_figure_handle, const octave_value_list &args)
 
static base_graphics_objectmake_graphics_object_from_type (const caseless_str &type, const graphics_handle &h=graphics_handle(), const graphics_handle &p=graphics_handle())
 
static double make_handle_fraction (void)
 
static void max_axes_scale (double &s, Matrix &limits, const Matrix &kids, double pbfactor, double dafactor, char limit_type, bool tight)
 
double norm (const ColumnVector &v)
 
void normalize (ColumnVector &v)
 
static void normalized_aspectratios (Matrix &aspectratios, const Matrix &scalefactors, double xlength, double ylength, double zlength)
 
static Matrix papersize_from_type (const caseless_str punits, const caseless_str typ)
 
static graphics_handle reparent (const octave_value &ov, const std::string &who, const std::string &property, const graphics_handle &new_parent, bool adopt=true)
 
void scale (Matrix &m, double x, double y, double z)
 
void scale (ColumnVector &v, double x, double y, double z)
 
static Matrix screen_size_pixels (void)
 
bool set_property_in_handle (double handle, const std::string &property, const octave_value &arg, const std::string &func)
 
ColumnVector transform (const Matrix &m, double x, double y, double z)
 
void translate (Matrix &m, double x, double y, double z)
 
void translate (ColumnVector &v, double x, double y, double z)
 
Matrix unit_cube (void)
 
static caseless_str validate_property_name (const std::string &who, const std::string &what, const std::set< std::string > &pnames, const caseless_str &pname)
 
static octave_value_list waitfor_del_listener (const octave_value_list &args, int)
 
static octave_value_list waitfor_listener (const octave_value_list &args, int)
 
static void xcreatefcn (const graphics_handle &h)
 
void xform (ColumnVector &v, const Matrix &m)
 
RowVector xform2cam (const ColumnVector &v)
 
Matrix xform_matrix (void)
 
Matrix xform_scale (double x, double y, double z)
 
Matrix xform_translate (double x, double y, double z)
 
ColumnVector xform_vector (void)
 
ColumnVector xform_vector (double x, double y, double z)
 
static octave_value xget (const graphics_handle &h, const caseless_str &name)
 
static void xinitialize (const graphics_handle &h)
 
static void xreset_default_properties (graphics_handle gh, property_list::pval_map_type factory_pval)
 
static void xset (const graphics_handle &h, const caseless_str &name, const octave_value &val)
 
static void xset (const graphics_handle &h, const octave_value_list &args)
 
static void xset_gcbo (const graphics_handle &h)
 

Variables

static std::map< caseless_str,
graphics_object
dprop_obj_map
 
static bool executing_callback = false
 
static std::set< doubleupdating_aspectratios
 
static bool updating_axes_layout = false
 
static std::set< doubleupdating_axis_limits
 
static bool updating_hggroup_limits = false
 
static bool updating_patch_data = false
 
static bool updating_title_position = false
 
static bool updating_xlabel_position = false
 
static bool updating_ylabel_position = false
 
static bool updating_zlabel_position = false
 
static std::map< uint32_t, boolwaitfor_results
 

Macro Definition Documentation

#define CHECK_ARRAY_EQUAL (   T,
  F,
  A 
)
Value:
{ \
if (data.numel () == 1) \
return data.F ## scalar_value () == \
v.F ## scalar_value (); \
else \
{ \
/* Keep copy of array_value to allow sparse/bool arrays */ \
/* that are converted, to not be deallocated early */ \
const A m1 = data.F ## array_value (); \
const T* d1 = m1.data (); \
const A m2 = v.F ## array_value (); \
const T* d2 = m2.data ();\
\
bool flag = true; \
\
for (int i = 0; flag && i < data.numel (); i++) \
if (d1[i] != d2[i]) \
flag = false; \
\
return flag; \
} \
}
int bool
Definition: mex.h:56
F77_RET_T const octave_idx_type Complex * A
Definition: CmplxGEPBAL.cc:39

Referenced by array_property::is_equal().

#define CONVERT_CDATA_1 (   ARRAY_T,
  VAL_FN,
  IS_REAL 
)
Value:
do \
{ \
ARRAY_T tmp = cdata. VAL_FN ## array_value (); \
convert_cdata_1 (is_scaled, IS_REAL, clim_0, clim_1, cmapv, \
tmp.data (), lda, nc, av); \
} \
while (0)
void convert_cdata_1(bool is_scaled, bool is_real, double clim_0, double clim_1, const double *cmapv, const T *cv, octave_idx_type lda, octave_idx_type nc, double *av)
Definition: graphics.cc:799

Referenced by convert_cdata().

#define FIX_LIMITS
Value:
if (limits.numel () == 4) \
{ \
val = limits(0); \
if (xfinite (val)) \
min_val = val; \
val = limits(1); \
if (xfinite (val)) \
max_val = val; \
val = limits(2); \
if (xfinite (val)) \
min_pos = val; \
val = limits(3); \
if (xfinite (val)) \
max_neg = val; \
} \
else \
{ \
limits.resize (4, 1); \
limits(0) = min_val; \
limits(1) = max_val; \
limits(2) = min_pos; \
limits(3) = max_neg; \
}
bool xfinite(double x)
Definition: lo-mappers.cc:152

Referenced by axes::update_axis_limits().

#define GO_BODY (   TYPE)
Value:
\
octave_value retval; \
\
if (args.length () > 0) \
retval = make_graphics_object (#TYPE, false, args); \
\
return retval
OCTINTERP_API void print_usage(void)
Definition: defun.cc:51
static octave_value make_graphics_object(const std::string &go_name, bool integer_figure_handle, const octave_value_list &args)
Definition: graphics.cc:10436
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))

Definition at line 10606 of file graphics.cc.

Referenced by F__go_axes__(), F__go_hggroup__(), F__go_image__(), F__go_line__(), F__go_patch__(), F__go_surface__(), F__go_text__(), F__go_uicontextmenu__(), F__go_uicontrol__(), F__go_uimenu__(), F__go_uipanel__(), F__go_uipushtool__(), F__go_uitoggletool__(), and F__go_uitoolbar__().

Function Documentation

static void adopt ( const graphics_handle p,
const graphics_handle h 
)
static

Definition at line 2736 of file graphics.cc.

References graphics_object::adopt(), and gh_manager::get_object().

Referenced by F__go_figure__(), and make_graphics_object().

int calc_dimensions ( const graphics_object go)
ColumnVector cam2xform ( const Array< double > &  m)
inline

Definition at line 5363 of file graphics.cc.

References Array< T >::fortran_vec().

Referenced by axes::properties::update_camera().

static void check_limit_vals ( double min_val,
double max_val,
double min_pos,
double max_neg,
const octave_value data 
)
static
static void cleanup_waitfor_id ( uint32_t  id)
static

Definition at line 11704 of file graphics.cc.

Referenced by Fwaitfor().

static void cleanup_waitfor_postset_listener ( const octave_value listener)
static

Definition at line 11748 of file graphics.cc.

References do_cleanup_waitfor_listener(), and POSTSET.

Referenced by Fwaitfor().

static void cleanup_waitfor_predelete_listener ( const octave_value listener)
static

Definition at line 11752 of file graphics.cc.

References do_cleanup_waitfor_listener(), and PREDELETE.

Referenced by Fwaitfor().

static void close_figure ( const graphics_handle handle)
static

Definition at line 2673 of file graphics.cc.

References gh_manager::execute_callback(), OCTAVE_SAFE_CALL, and xget().

Referenced by gh_manager::do_close_all_figures().

static bool compare_property_values ( const octave_value o1,
const octave_value o2 
)
static

Definition at line 11686 of file graphics.cc.

References error_state, feval(), and octave_value_list::length().

Referenced by Fwaitfor(), and waitfor_listener().

static octave_value convert_cdata ( const base_properties props,
const octave_value cdata,
bool  is_scaled,
int  cdim 
)
static
template<class T >
void convert_cdata_1 ( bool  is_scaled,
bool  is_real,
double  clim_0,
double  clim_1,
const double cmapv,
const T *  cv,
octave_idx_type  lda,
octave_idx_type  nc,
double av 
)

Definition at line 799 of file graphics.cc.

References convert_cdata_2().

static void convert_cdata_2 ( bool  is_scaled,
bool  is_real,
double  clim_0,
double  clim_1,
const double cmapv,
double  x,
octave_idx_type  lda,
octave_idx_type  nc,
octave_idx_type  i,
double av 
)
static

Definition at line 767 of file graphics.cc.

References x, xisnan(), and xround().

Referenced by convert_cdata_1().

static double convert_font_size ( double  font_size,
const caseless_str from_units,
const caseless_str to_units,
double  parent_height = 0 
)
static
static ColumnVector convert_label_position ( const ColumnVector p,
const text::properties props,
const graphics_xform xform,
const Matrix bbox 
)
static
static octave_value convert_linestyleorder_string ( const octave_value val)
static
static Matrix convert_position ( const Matrix pos,
const caseless_str from_units,
const caseless_str to_units,
const Matrix parent_dim 
)
static
static Matrix convert_text_position ( const Matrix pos,
const text::properties props,
const caseless_str from_units,
const caseless_str to_units 
)
static
static octave_value convert_ticklabel_string ( const octave_value val)
static
ColumnVector cross ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5334 of file graphics.cc.

References v1, v2, and xform_vector().

Referenced by axes::properties::update_camera().

void cross_product ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2,
double x,
double y,
double z 
)
inline

Definition at line 8506 of file graphics.cc.

Referenced by surface::properties::update_normals().

static Matrix default_axes_outerposition ( void  )
static
static Matrix default_axes_position ( void  )
static
static Matrix default_axes_tick ( void  )
static

Definition at line 373 of file graphics.cc.

Referenced by axes::properties::factory_defaults().

static Matrix default_axes_ticklength ( void  )
static
static Matrix default_axes_view ( void  )
static

Definition at line 365 of file graphics.cc.

Referenced by axes::properties::factory_defaults().

static Matrix default_colororder ( void  )
static
static Matrix default_control_position ( void  )
static

Definition at line 426 of file graphics.cc.

Referenced by uicontrol::properties::factory_defaults().

static Matrix default_control_sliderstep ( void  )
static

Definition at line 439 of file graphics.cc.

Referenced by uicontrol::properties::factory_defaults().

static Matrix default_data ( void  )
static

Definition at line 248 of file graphics.cc.

Referenced by line::properties::factory_defaults().

static Matrix default_figure_paperposition ( void  )
static

Definition at line 415 of file graphics.cc.

Referenced by figure::properties::factory_defaults().

static Matrix default_figure_papersize ( void  )
static

Definition at line 406 of file graphics.cc.

Referenced by figure::properties::factory_defaults().

static Matrix default_figure_position ( void  )
static
static Matrix default_image_cdata ( void  )
static

Definition at line 259 of file graphics.cc.

References default_im_data.

Referenced by image::properties::factory_defaults().

static Matrix default_lim ( bool  logscale = false)
static
static Matrix default_panel_position ( void  )
static

Definition at line 450 of file graphics.cc.

Referenced by uipanel::properties::factory_defaults().

static Matrix default_patch_faces ( void  )
static

Definition at line 311 of file graphics.cc.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_vertices ( void  )
static

Definition at line 320 of file graphics.cc.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_xdata ( void  )
static

Definition at line 330 of file graphics.cc.

Referenced by patch::properties::factory_defaults().

static Matrix default_patch_ydata ( void  )
static

Definition at line 338 of file graphics.cc.

Referenced by patch::properties::factory_defaults().

static double default_screendepth ( void  )
static

Definition at line 182 of file graphics.cc.

References display_info::depth().

Referenced by root_figure::properties::factory_defaults().

static double default_screenpixelsperinch ( void  )
static

Definition at line 199 of file graphics.cc.

References display_info::x_dpi(), and display_info::y_dpi().

Referenced by root_figure::properties::factory_defaults().

static Matrix default_screensize ( void  )
static
static Matrix default_surface_cdata ( void  )
static

Definition at line 305 of file graphics.cc.

References default_surface_zdata().

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_xdata ( void  )
static

Definition at line 274 of file graphics.cc.

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_ydata ( void  )
static

Definition at line 285 of file graphics.cc.

Referenced by surface::properties::factory_defaults().

static Matrix default_surface_zdata ( void  )
static

Definition at line 296 of file graphics.cc.

Referenced by default_surface_cdata(), and surface::properties::factory_defaults().

static void delete_graphics_object ( const graphics_handle h)
static
static void delete_graphics_object ( double  val)
static

Definition at line 2660 of file graphics.cc.

References delete_graphics_object(), and gh_manager::lookup().

static void delete_graphics_objects ( const NDArray  vals)
static

Definition at line 2666 of file graphics.cc.

References delete_graphics_object(), Array< T >::elem(), and Array< T >::numel().

Referenced by F__go_delete__().

static void do_cleanup_waitfor_listener ( const octave_value listener,
listener_mode  mode = POSTSET 
)
static
static Matrix do_translate ( double  x0,
double  x1,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 7819 of file graphics.cc.

References pow().

Referenced by axes::properties::translate_view().

static Matrix do_zoom ( double  val,
double  factor,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 7680 of file graphics.cc.

References pow().

Referenced by axes::properties::zoom_about_point().

double dot ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5322 of file graphics.cc.

References v1, and v2.

Referenced by install_dot_fcns(), norm(), and axes::properties::update_camera().

OCTAVE_EXPORT octave_value_list F__calc_dimensions__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__get__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__go_axes__ ( const octave_value_list args,
int   
)

Definition at line 10685 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_axes_init__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__go_delete__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__go_execute_callback__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__go_figure__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__go_figure_handles__ ( const octave_value_list args,
int   
)

Definition at line 10927 of file graphics.cc.

References gh_manager::figure_handle_list(), and octave_value().

OCTAVE_EXPORT octave_value_list F__go_handles__ ( const octave_value_list args,
int   
)

Definition at line 10911 of file graphics.cc.

References gh_manager::handle_list(), and octave_value().

OCTAVE_EXPORT octave_value_list F__go_hggroup__ ( const octave_value_list args,
int   
)

Definition at line 10739 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_image__ ( const octave_value_list args,
int   
)

Definition at line 10712 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_line__ ( const octave_value_list args,
int   
)

Definition at line 10694 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_patch__ ( const octave_value_list args,
int   
)

Definition at line 10730 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_surface__ ( const octave_value_list args,
int   
)

Definition at line 10721 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_text__ ( const octave_value_list args,
int   
)

Definition at line 10703 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uicontextmenu__ ( const octave_value_list args,
int   
)

Definition at line 10775 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uicontrol__ ( const octave_value_list args,
int   
)

Definition at line 10757 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uimenu__ ( const octave_value_list args,
int   
)

Definition at line 10748 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uipanel__ ( const octave_value_list args,
int   
)

Definition at line 10766 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uipushtool__ ( const octave_value_list args,
int   
)

Definition at line 10793 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uitoggletool__ ( const octave_value_list args,
int   
)

Definition at line 10802 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__go_uitoolbar__ ( const octave_value_list args,
int   
)

Definition at line 10784 of file graphics.cc.

References GO_BODY.

OCTAVE_EXPORT octave_value_list F__image_pixel_size__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list F__is_handle_visible__ ( const octave_value_list args,
int   
)

Definition at line 9829 of file graphics.cc.

References is_handle_visible(), and print_usage().

OCTAVE_EXPORT octave_value_list F__zoom__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Faddlistener ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Faddproperty ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits ( const octave_value_list ,
int   
)

Definition at line 11120 of file graphics.cc.

References gtk_manager::available_toolkits_list(), and octave_value().

OCTAVE_EXPORT octave_value_list Fdellistener ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fdrawnow ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fget ( const octave_value_list args,
int   
)
static void finalize_r ( const graphics_handle h)
static
OCTAVE_EXPORT octave_value_list Fishandle ( const octave_value_list args,
int   
)

Definition at line 9774 of file graphics.cc.

References is_handle(), and print_usage().

OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits ( const octave_value_list ,
int   
)

Definition at line 11159 of file graphics.cc.

References gtk_manager::loaded_toolkits_list(), and octave_value().

static void force_close_figure ( const graphics_handle handle)
static

Definition at line 2681 of file graphics.cc.

References delete_graphics_object(), and xset().

Referenced by gh_manager::do_close_all_figures().

double force_in_range ( double  x,
double  lower,
double  upper 
)
inline

Definition at line 7669 of file graphics.cc.

References x.

OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit ( const octave_value_list args,
int   
)

Definition at line 11132 of file graphics.cc.

References error(), print_usage(), and gtk_manager::register_toolkit().

Referenced by octave_start_gui().

OCTAVE_EXPORT octave_value_list Freset ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fset ( const octave_value_list args,
int  nargout 
)
OCTAVE_EXPORT octave_value_list Fwaitfor ( const octave_value_list args,
int   
)
graphics_handle gca ( void  )
graphics_handle gcf ( void  )

Definition at line 2611 of file graphics.cc.

References octave_value::double_value(), octave_value::is_empty(), octave_NaN, and xget().

Referenced by Fdrawnow(), and gca().

template<class T >
static void get_array_limits ( const Array< T > &  m,
double emin,
double emax,
double eminp,
double emaxp 
)
static

Definition at line 897 of file graphics.cc.

References Array< T >::data(), Array< T >::numel(), and xisinf().

Referenced by array_property::get_data_limits().

void get_children_limits ( double min_val,
double max_val,
double min_pos,
double max_neg,
const Matrix kids,
char  limit_type 
)
static std::string get_graphics_object_type ( double  val)
static

Definition at line 10185 of file graphics.cc.

References error(), gh_manager::get_object(), and graphics_object::type().

Referenced by Fget().

octave_value get_property_from_handle ( double  handle,
const std::string &  property,
const std::string &  func 
)

Definition at line 11647 of file graphics.cc.

References error(), graphics_object::get(), and gh_manager::get_object().

Referenced by mexGet().

static void gripe_set_invalid ( const std::string &  pname)
static
static void initialize_r ( const graphics_handle h)
static
static bool is_figure ( double  val)
static

Definition at line 2782 of file graphics.cc.

References gh_manager::get_object(), and graphics_object::isa().

Referenced by F__go_figure__().

static bool is_handle ( const graphics_handle h)
static
static bool is_handle ( double  val)
static

Definition at line 2749 of file graphics.cc.

References gh_manager::lookup(), and octave_handle::ok().

static octave_value is_handle ( const octave_value val)
static
static bool is_handle_visible ( const graphics_handle h)
static
static bool is_handle_visible ( double  val)
static

Definition at line 9795 of file graphics.cc.

References is_handle_visible(), and gh_manager::lookup().

static octave_value is_handle_visible ( const octave_value val)
static
static Matrix jet_colormap ( void  )
static

Definition at line 137 of file graphics.cc.

References x.

Referenced by figure::properties::factory_defaults().

static bool lookup_object_name ( const caseless_str name,
caseless_str go_name,
caseless_str rest 
)
static

Definition at line 926 of file graphics.cc.

References caseless_str::compare().

Referenced by property::create().

static void magform ( double  x,
double a,
int b 
)
static

Definition at line 6870 of file graphics.cc.

References abs(), floor(), and pow().

Referenced by axes::properties::calc_tick_sep().

static octave_value make_graphics_object ( const std::string &  go_name,
bool  integer_figure_handle,
const octave_value_list args 
)
static
static base_graphics_object* make_graphics_object_from_type ( const caseless_str type,
const graphics_handle h = graphics_handle (),
const graphics_handle p = graphics_handle () 
)
static

Definition at line 1004 of file graphics.cc.

References caseless_str::compare().

Referenced by property::create(), and gh_manager::do_make_graphics_handle().

static double make_handle_fraction ( void  )
static
static void max_axes_scale ( double s,
Matrix limits,
const Matrix kids,
double  pbfactor,
double  dafactor,
char  limit_type,
bool  tight 
)
static

Definition at line 6254 of file graphics.cc.

References get_children_limits(), octave_Inf, xfinite(), and xmax().

Referenced by axes::properties::update_aspectratios().

double norm ( const ColumnVector v)
inline
void normalize ( ColumnVector v)
inline

Definition at line 5315 of file graphics.cc.

References scale().

Referenced by axes::properties::update_camera().

static void normalized_aspectratios ( Matrix aspectratios,
const Matrix scalefactors,
double  xlength,
double  ylength,
double  zlength 
)
static

Definition at line 6239 of file graphics.cc.

References xmin().

Referenced by axes::properties::update_aspectratios().

static Matrix papersize_from_type ( const caseless_str  punits,
const caseless_str  typ 
)
static
static graphics_handle reparent ( const octave_value ov,
const std::string &  who,
const std::string &  property,
const graphics_handle new_parent,
bool  adopt = true 
)
static
void scale ( Matrix m,
double  x,
double  y,
double  z 
)
inline
void scale ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5299 of file graphics.cc.

References x.

static Matrix screen_size_pixels ( void  )
static
bool set_property_in_handle ( double  handle,
const std::string &  property,
const octave_value arg,
const std::string &  func 
)

Definition at line 11664 of file graphics.cc.

References error(), error_state, gh_manager::get_object(), and graphics_object::set().

Referenced by mexSet().

ColumnVector transform ( const Matrix m,
double  x,
double  y,
double  z 
)
inline
void translate ( Matrix m,
double  x,
double  y,
double  z 
)
inline
void translate ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5307 of file graphics.cc.

References x.

Matrix unit_cube ( void  )
inline

Definition at line 5344 of file graphics.cc.

References Array< T >::fortran_vec().

Referenced by axes::properties::update_camera().

static caseless_str validate_property_name ( const std::string &  who,
const std::string &  what,
const std::set< std::string > &  pnames,
const caseless_str pname 
)
static

Definition at line 77 of file graphics.cc.

References caseless_str::compare(), error(), string_vector::list_in_columns(), and warning_with_id().

Referenced by root_figure::properties::get(), figure::properties::get(), axes::properties::get(), line::properties::get(), text::properties::get(), image::properties::get(), patch::properties::get(), surface::properties::get(), hggroup::properties::get(), uimenu::properties::get(), uicontextmenu::properties::get(), uicontrol::properties::get(), uipanel::properties::get(), uitoolbar::properties::get(), uipushtool::properties::get(), uitoggletool::properties::get(), root_figure::properties::get_property(), figure::properties::get_property(), axes::properties::get_property(), line::properties::get_property(), text::properties::get_property(), image::properties::get_property(), patch::properties::get_property(), surface::properties::get_property(), hggroup::properties::get_property(), uimenu::properties::get_property(), uicontextmenu::properties::get_property(), uicontrol::properties::get_property(), uipanel::properties::get_property(), uitoolbar::properties::get_property(), uipushtool::properties::get_property(), uitoggletool::properties::get_property(), root_figure::properties::set(), figure::properties::set(), axes::properties::set(), line::properties::set(), text::properties::set(), image::properties::set(), patch::properties::set(), surface::properties::set(), hggroup::properties::set(), uimenu::properties::set(), uicontextmenu::properties::set(), uicontrol::properties::set(), uipanel::properties::set(), uitoolbar::properties::set(), uipushtool::properties::set(), and uitoggletool::properties::set().

static octave_value_list waitfor_del_listener ( const octave_value_list args,
int   
)
static

Definition at line 11798 of file graphics.cc.

References error_state, and octave_value_list::length().

Referenced by Fwaitfor().

static octave_value_list waitfor_listener ( const octave_value_list args,
int   
)
static
static void xcreatefcn ( const graphics_handle h)
static
void xform ( ColumnVector v,
const Matrix m 
)
inline
RowVector xform2cam ( const ColumnVector v)
inline

Definition at line 5371 of file graphics.cc.

References ColumnVector::extract_n(), and ColumnVector::transpose().

Referenced by axes::properties::update_camera().

Matrix xform_matrix ( void  )
inline
Matrix xform_scale ( double  x,
double  y,
double  z 
)
inline

Definition at line 5265 of file graphics.cc.

References x.

Referenced by scale().

Matrix xform_translate ( double  x,
double  y,
double  z 
)
inline

Definition at line 5273 of file graphics.cc.

References x, and xform_matrix().

Referenced by translate().

ColumnVector xform_vector ( void  )
inline
ColumnVector xform_vector ( double  x,
double  y,
double  z 
)
inline

Definition at line 5251 of file graphics.cc.

References x.

static octave_value xget ( const graphics_handle h,
const caseless_str name 
)
static
static void xinitialize ( const graphics_handle h)
static
static void xreset_default_properties ( graphics_handle  gh,
property_list::pval_map_type  factory_pval 
)
static
static void xset ( const graphics_handle h,
const caseless_str name,
const octave_value val 
)
static
static void xset ( const graphics_handle h,
const octave_value_list args 
)
static
static void xset_gcbo ( const graphics_handle h)
static

Variable Documentation

std::map<caseless_str, graphics_object> dprop_obj_map
static

Definition at line 1624 of file graphics.cc.

bool executing_callback = false
static

Definition at line 1596 of file graphics.cc.

std::set<double> updating_aspectratios
static

Definition at line 6275 of file graphics.cc.

bool updating_axes_layout = false
static

Definition at line 5597 of file graphics.cc.

std::set<double> updating_axis_limits
static

Definition at line 7301 of file graphics.cc.

bool updating_hggroup_limits = false
static

Definition at line 8638 of file graphics.cc.

bool updating_patch_data = false
static

Definition at line 8306 of file graphics.cc.

bool updating_title_position = false
static

Definition at line 6173 of file graphics.cc.

bool updating_xlabel_position = false
static

Definition at line 5836 of file graphics.cc.

bool updating_ylabel_position = false
static

Definition at line 5938 of file graphics.cc.

bool updating_zlabel_position = false
static

Definition at line 6049 of file graphics.cc.

std::map<uint32_t, bool> waitfor_results
static

Definition at line 11701 of file graphics.cc.