GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
graphics.cc File Reference
#include <cctype>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <limits>
#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 "oct-time.h"
#include "builtin-defun-decls.h"
#include "defun.h"
#include "display.h"
#include "error.h"
#include "graphics.h"
#include "input.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "ov.h"
#include "ovl.h"
#include "oct-map.h"
#include "ov-fcn-handle.h"
#include "pager.h"
#include "parse.h"
#include "text-engine.h"
#include "text-renderer.h"
#include "unwind-prot.h"
#include "utils.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  callback_props
 
class  function_event
 
class  mcode_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 &parent_h, 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 &h)
 
static bool compare_property_values (const octave_value &ov1, const octave_value &ov2)
 
static octave_value convert_cdata (const base_properties &props, const octave_value &cdata, bool is_scaled, int cdim)
 
template<typename 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)
 
std::vector< octave_idx_typecoplanar_partition (const Matrix &vert, const Matrix &idx, octave_idx_type nc, octave_idx_type jj)
 
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_data_lim (void)
 
static Matrix default_figure_paperposition (void)
 
static Matrix default_figure_papersize (void)
 
static Matrix default_figure_position (void)
 
static std::string default_graphics_toolkit (void)
 
static Matrix default_image_cdata (void)
 
static Matrix default_light_position (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 Matrix default_table_backgroundcolor (void)
 
static Matrix default_table_position (void)
 
static void delete_graphics_object (const graphics_handle &h, bool from_root=false)
 
static void delete_graphics_object (double val, bool from_root=false)
 
static void delete_graphics_objects (const NDArray vals, bool from_root=false)
 
static double device_pixel_ratio (graphics_handle h)
 
static void do_cleanup_waitfor_listener (const octave_value &listener, listener_mode mode=GCB_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)
 
static OCTAVE_NORETURN void err_set_invalid (const std::string &pname)
 
OCTAVE_EXPORT octave_value_list F__calc_dimensions__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__get__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__get_frame__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__get_system_fonts__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_axes__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_delete__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_execute_callback__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_figure__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_figure_handles__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_handles__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_hggroup__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_image__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_light__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_line__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_patch__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_post_callback__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_surface__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_text__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uibuttongroup__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uicontextmenu__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uicontrol__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uimenu__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uipanel__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uipushtool__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uitable__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uitoggletool__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__go_uitoolbar__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__image_pixel_size__ (octave::interpreter &interp, 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__show_figure__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__update_normals__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__zoom__ (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Faddlistener (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Faddproperty (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits (octave::interpreter &interp, const octave_value_list &, int)
 
OCTAVE_EXPORT octave_value_list Fdellistener (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdrawnow (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fget (octave::interpreter &interp, const octave_value_list &args, int)
 
static void finalize_r (const graphics_handle &h)
 
OCTAVE_EXPORT octave_value_list Fishghandle (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits (octave::interpreter &interp, const octave_value_list &, int)
 
static void force_close_figure (const graphics_handle &h)
 
double force_in_range (double x, double lower, double upper)
 
OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Freset (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fset (octave::interpreter &interp, const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fwaitfor (octave::interpreter &interp, const octave_value_list &args, int)
 
graphics_handle gca (void)
 
graphics_handle gcf (void)
 
template<typename 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 initialize_r (const graphics_handle &h)
 
bool is_coplanar (const Matrix &cov)
 
static bool is_handle_visible (const graphics_handle &h)
 
static octave_value is_handle_visible (const octave_value &val)
 
static bool is_handle_visible (double val)
 
static bool isfigure (double val)
 
static bool ishghandle (const graphics_handle &h)
 
static octave_value ishghandle (const octave_value &val)
 
static bool ishghandle (double val)
 
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 graphics_handle make_graphics_handle (const std::string &go_name, const graphics_handle &parent, bool integer_figure_handle=false, bool call_createfcn=true, bool notify_toolkit=true)
 
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 ptype)
 
static int process_graphics_events (void)
 
static graphics_handle reparent (const octave_value &ov, const std::string &who, const std::string &pname, const graphics_handle &new_parent, bool adopt=true)
 
void scale (ColumnVector &v, double x, double y, double z)
 
void scale (Matrix &m, 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)
 
static int toggle_warn (std::string id, bool on, int state=-1)
 
ColumnVector transform (const Matrix &m, double x, double y, double z)
 
void translate (ColumnVector &v, double x, double y, double z)
 
void translate (Matrix &m, double x, double y, double z)
 
Matrix unit_cube (void)
 
static void update_text_pos (graphics_handle h)
 
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 Matrix viridis_colormap (void)
 
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 (double x, double y, double z)
 
ColumnVector xform_vector (void)
 
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 h, property_list::pval_map_type factory_pval)
 
static void xset (const graphics_handle &h, const caseless_str &pname, 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 bool delete_executing = false
 
static std::map< caseless_str, graphics_objectdprop_obj_map
 
static callback_props executing_callbacks
 
static std::set< double > updating_aspectratios
 
static bool updating_axes_layout = false
 
static std::set< double > updating_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, bool > waitfor_results
 

Macro Definition Documentation

◆ CHECK_ARRAY_EQUAL

#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; \
} \
}
F77_RET_T const F77_INT F77_CMPLX * A
for(octave_idx_type i=0;i< n;i++) ac+
Definition: mx-inlines.cc:756

◆ CONVERT_CDATA_1

#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:989

◆ FIX_LIMITS

#define FIX_LIMITS
Value:
val = limits(0); \
min_val = val; \
val = limits(1); \
max_val = val;
bool isfinite(double x)
Definition: lo-mappers.h:192

◆ GO_BODY

#define GO_BODY (   TYPE)
Value:
gh_manager& gh_mgr = interp.get_gh_manager (); \
\
octave::autolock guard (gh_mgr.graphics_lock ()); \
\
if (args.length () == 0) \
print_usage (); \
\
return octave_value (make_graphics_object (#TYPE, false, args)); \
octave::mutex graphics_lock(void)
Definition: graphics.in.h:6393
static octave_value make_graphics_object(const std::string &go_name, bool integer_figure_handle, const octave_value_list &args)
Definition: graphics.cc:13043
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 13214 of file graphics.cc.

Function Documentation

◆ adopt()

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

◆ calc_dimensions()

◆ cam2xform()

ColumnVector cam2xform ( const Array< double > &  m)
inline

Definition at line 5932 of file graphics.cc.

References Array< T >::fortran_vec(), m, and retval.

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

◆ check_limit_vals()

static void check_limit_vals ( double &  min_val,
double &  max_val,
double &  min_pos,
double &  max_neg,
const octave_value data 
)
static

◆ cleanup_waitfor_id()

static void cleanup_waitfor_id ( uint32_t  id)
static

Definition at line 14108 of file graphics.cc.

References waitfor_results.

Referenced by Fwaitfor().

◆ cleanup_waitfor_postset_listener()

static void cleanup_waitfor_postset_listener ( const octave_value listener)
static

Definition at line 14149 of file graphics.cc.

References do_cleanup_waitfor_listener(), and GCB_POSTSET.

Referenced by Fwaitfor().

◆ cleanup_waitfor_predelete_listener()

static void cleanup_waitfor_predelete_listener ( const octave_value listener)
static

Definition at line 14153 of file graphics.cc.

References do_cleanup_waitfor_listener(), and GCB_PREDELETE.

Referenced by Fwaitfor().

◆ close_figure()

static void close_figure ( const graphics_handle h)
static

◆ compare_property_values()

static bool compare_property_values ( const octave_value ov1,
const octave_value ov2 
)
static

Definition at line 14090 of file graphics.cc.

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

Referenced by Fwaitfor(), and waitfor_listener().

◆ convert_cdata()

◆ convert_cdata_1()

template<typename 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 989 of file graphics.cc.

References convert_cdata_2().

◆ 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 957 of file graphics.cc.

References octave::math::fix(), octave::math::isnan(), and x.

Referenced by convert_cdata_1().

◆ convert_font_size()

◆ convert_label_position()

◆ convert_linestyleorder_string()

◆ convert_position()

◆ convert_text_position()

◆ convert_ticklabel_string()

◆ coplanar_partition()

std::vector<octave_idx_type> coplanar_partition ( const Matrix vert,
const Matrix idx,
octave_idx_type  nc,
octave_idx_type  jj 
)

Definition at line 9725 of file graphics.cc.

References is_coplanar(), Matrix::resize(), and Matrix::transpose().

◆ cross()

ColumnVector cross ( const ColumnVector v1,
const ColumnVector v2 
)
inline

Definition at line 5899 of file graphics.cc.

References r, v2, and xform_vector().

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

◆ cross_product()

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 9956 of file graphics.cc.

References x.

◆ default_axes_outerposition()

static Matrix default_axes_outerposition ( void  )
static

Definition at line 449 of file graphics.cc.

References m.

◆ default_axes_position()

static Matrix default_axes_position ( void  )
static

Definition at line 436 of file graphics.cc.

References m.

◆ default_axes_tick()

static Matrix default_axes_tick ( void  )
static

Definition at line 473 of file graphics.cc.

References m.

◆ default_axes_ticklength()

static Matrix default_axes_ticklength ( void  )
static

Definition at line 488 of file graphics.cc.

References m.

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

◆ default_axes_view()

static Matrix default_axes_view ( void  )
static

Definition at line 462 of file graphics.cc.

References m.

◆ default_colororder()

static Matrix default_colororder ( void  )
static

Definition at line 257 of file graphics.cc.

References retval.

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

◆ default_control_position()

static Matrix default_control_position ( void  )
static

Definition at line 546 of file graphics.cc.

References retval.

◆ default_control_sliderstep()

static Matrix default_control_sliderstep ( void  )
static

Definition at line 559 of file graphics.cc.

References retval.

◆ default_data()

static Matrix default_data ( void  )
static

Definition at line 311 of file graphics.cc.

References retval.

◆ default_data_lim()

static Matrix default_data_lim ( void  )
static

Definition at line 322 of file graphics.cc.

References Inf, and retval.

◆ default_figure_paperposition()

static Matrix default_figure_paperposition ( void  )
static

Definition at line 523 of file graphics.cc.

References m.

◆ default_figure_papersize()

static Matrix default_figure_papersize ( void  )
static

Definition at line 512 of file graphics.cc.

References m.

◆ default_figure_position()

static Matrix default_figure_position ( void  )
static

Definition at line 499 of file graphics.cc.

References m.

Referenced by axes::properties::get_boundingbox(), and uicontrol::properties::get_boundingbox().

◆ default_graphics_toolkit()

static std::string default_graphics_toolkit ( void  )
static

◆ default_image_cdata()

static Matrix default_image_cdata ( void  )
static

Definition at line 335 of file graphics.cc.

References default_im_data, and m.

◆ default_light_position()

static Matrix default_light_position ( void  )
static

Definition at line 583 of file graphics.cc.

References m.

◆ default_lim()

static Matrix default_lim ( bool  logscale = false)
static

Definition at line 292 of file graphics.cc.

References m.

◆ default_panel_position()

static Matrix default_panel_position ( void  )
static

Definition at line 570 of file graphics.cc.

References retval.

◆ default_patch_faces()

static Matrix default_patch_faces ( void  )
static

Definition at line 392 of file graphics.cc.

References m.

◆ default_patch_vertices()

static Matrix default_patch_vertices ( void  )
static

Definition at line 404 of file graphics.cc.

References m.

◆ default_patch_xdata()

static Matrix default_patch_xdata ( void  )
static

Definition at line 416 of file graphics.cc.

References m.

◆ default_patch_ydata()

static Matrix default_patch_ydata ( void  )
static

Definition at line 426 of file graphics.cc.

References m.

◆ default_screendepth()

static double default_screendepth ( void  )
static

Definition at line 223 of file graphics.cc.

References octave::__get_display_info__(), and octave::display_info::depth().

◆ default_screenpixelsperinch()

static double default_screenpixelsperinch ( void  )
static

◆ default_screensize()

static Matrix default_screensize ( void  )
static

◆ default_surface_cdata()

static Matrix default_surface_cdata ( void  )
static

Definition at line 386 of file graphics.cc.

References default_surface_zdata().

◆ default_surface_xdata()

static Matrix default_surface_xdata ( void  )
static

Definition at line 351 of file graphics.cc.

References m.

◆ default_surface_ydata()

static Matrix default_surface_ydata ( void  )
static

Definition at line 363 of file graphics.cc.

References m.

◆ default_surface_zdata()

static Matrix default_surface_zdata ( void  )
static

Definition at line 375 of file graphics.cc.

References m.

Referenced by default_surface_cdata().

◆ default_table_backgroundcolor()

static Matrix default_table_backgroundcolor ( void  )
static

Definition at line 608 of file graphics.cc.

References retval.

◆ default_table_position()

static Matrix default_table_position ( void  )
static

Definition at line 595 of file graphics.cc.

References retval.

◆ delete_graphics_object() [1/2]

◆ delete_graphics_object() [2/2]

static void delete_graphics_object ( double  val,
bool  from_root = false 
)
static

◆ delete_graphics_objects()

static void delete_graphics_objects ( const NDArray  vals,
bool  from_root = false 
)
static

◆ device_pixel_ratio()

◆ do_cleanup_waitfor_listener()

◆ do_translate()

static Matrix do_translate ( double  x0,
double  x1,
const Matrix lims,
bool  is_logscale 
)
static

Definition at line 9004 of file graphics.cc.

References pow().

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

◆ do_zoom()

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

Definition at line 8859 of file graphics.cc.

References pow().

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

◆ dot()

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

Definition at line 5887 of file graphics.cc.

References v2.

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

◆ err_set_invalid()

static OCTAVE_NORETURN void err_set_invalid ( const std::string &  pname)
static

Definition at line 75 of file graphics.cc.

References error().

◆ F__calc_dimensions__()

OCTAVE_EXPORT octave_value_list F__calc_dimensions__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__get__()

◆ F__get_frame__()

◆ F__get_system_fonts__()

OCTAVE_EXPORT octave_value_list F__get_system_fonts__ ( const octave_value_list args,
int   
)

Definition at line 14535 of file graphics.cc.

References octave::text_renderer::get_system_fonts(), ovl(), and print_usage().

◆ F__go_axes__()

OCTAVE_EXPORT octave_value_list F__go_axes__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13284 of file graphics.cc.

References GO_BODY.

◆ F__go_delete__()

◆ F__go_execute_callback__()

OCTAVE_EXPORT octave_value_list F__go_execute_callback__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__go_figure__()

◆ F__go_figure_handles__()

OCTAVE_EXPORT octave_value_list F__go_figure_handles__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__go_handles__()

OCTAVE_EXPORT octave_value_list F__go_handles__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13469 of file graphics.cc.

References gh_manager::graphics_lock(), gh_manager::handle_list(), and ovl().

◆ F__go_hggroup__()

OCTAVE_EXPORT octave_value_list F__go_hggroup__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13347 of file graphics.cc.

References GO_BODY.

◆ F__go_image__()

OCTAVE_EXPORT octave_value_list F__go_image__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13311 of file graphics.cc.

References GO_BODY.

◆ F__go_light__()

OCTAVE_EXPORT octave_value_list F__go_light__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13338 of file graphics.cc.

References GO_BODY.

◆ F__go_line__()

OCTAVE_EXPORT octave_value_list F__go_line__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13293 of file graphics.cc.

References GO_BODY.

◆ F__go_patch__()

OCTAVE_EXPORT octave_value_list F__go_patch__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13329 of file graphics.cc.

References GO_BODY.

◆ F__go_post_callback__()

OCTAVE_EXPORT octave_value_list F__go_post_callback__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__go_surface__()

OCTAVE_EXPORT octave_value_list F__go_surface__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13320 of file graphics.cc.

References GO_BODY.

◆ F__go_text__()

OCTAVE_EXPORT octave_value_list F__go_text__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13302 of file graphics.cc.

References GO_BODY.

◆ F__go_uibuttongroup__()

OCTAVE_EXPORT octave_value_list F__go_uibuttongroup__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13374 of file graphics.cc.

References GO_BODY.

◆ F__go_uicontextmenu__()

OCTAVE_EXPORT octave_value_list F__go_uicontextmenu__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13392 of file graphics.cc.

References GO_BODY.

◆ F__go_uicontrol__()

OCTAVE_EXPORT octave_value_list F__go_uicontrol__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13365 of file graphics.cc.

References GO_BODY.

◆ F__go_uimenu__()

OCTAVE_EXPORT octave_value_list F__go_uimenu__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13356 of file graphics.cc.

References GO_BODY.

◆ F__go_uipanel__()

OCTAVE_EXPORT octave_value_list F__go_uipanel__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13383 of file graphics.cc.

References GO_BODY.

◆ F__go_uipushtool__()

OCTAVE_EXPORT octave_value_list F__go_uipushtool__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13419 of file graphics.cc.

References GO_BODY.

◆ F__go_uitable__()

OCTAVE_EXPORT octave_value_list F__go_uitable__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13401 of file graphics.cc.

References GO_BODY.

◆ F__go_uitoggletool__()

OCTAVE_EXPORT octave_value_list F__go_uitoggletool__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13428 of file graphics.cc.

References GO_BODY.

◆ F__go_uitoolbar__()

OCTAVE_EXPORT octave_value_list F__go_uitoolbar__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 13410 of file graphics.cc.

References GO_BODY.

◆ F__image_pixel_size__()

OCTAVE_EXPORT octave_value_list F__image_pixel_size__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__is_handle_visible__()

OCTAVE_EXPORT octave_value_list F__is_handle_visible__ ( const octave_value_list args,
int   
)

Definition at line 12535 of file graphics.cc.

References is_handle_visible(), ovl(), and print_usage().

◆ F__show_figure__()

◆ F__update_normals__()

OCTAVE_EXPORT octave_value_list F__update_normals__ ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ F__zoom__()

◆ Faddlistener()

◆ Faddproperty()

◆ Favailable_graphics_toolkits()

OCTAVE_EXPORT octave_value_list Favailable_graphics_toolkits ( octave::interpreter interp,
const octave_value_list ,
int   
)

◆ Fdellistener()

◆ Fdrawnow()

◆ Fget()

◆ finalize_r()

◆ Fishghandle()

OCTAVE_EXPORT octave_value_list Fishghandle ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 12462 of file graphics.cc.

References gh_manager::graphics_lock(), ishghandle(), ovl(), and print_usage().

◆ Floaded_graphics_toolkits()

OCTAVE_EXPORT octave_value_list Floaded_graphics_toolkits ( octave::interpreter interp,
const octave_value_list ,
int   
)

◆ force_close_figure()

static void force_close_figure ( const graphics_handle h)
static

Definition at line 3077 of file graphics.cc.

References delete_graphics_object(), and xset().

Referenced by gh_manager::close_all_figures().

◆ force_in_range()

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

Definition at line 8848 of file graphics.cc.

References x.

◆ Fregister_graphics_toolkit()

OCTAVE_EXPORT octave_value_list Fregister_graphics_toolkit ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Freset()

◆ Fset()

◆ Fwaitfor()

◆ gca()

graphics_handle gca ( void  )

Definition at line 3012 of file graphics.cc.

References octave_value::double_value(), gcf(), octave_value::isempty(), NaN, and xget().

◆ gcf()

graphics_handle gcf ( void  )

Definition at line 3002 of file graphics.cc.

References octave_value::double_value(), octave_value::isempty(), NaN, and xget().

Referenced by Fdrawnow(), and gca().

◆ get_array_limits()

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

Definition at line 1101 of file graphics.cc.

References octave::math::isinf(), m, and n.

Referenced by array_property::get_data_limits().

◆ get_children_limits()

◆ get_graphics_object_type()

static std::string get_graphics_object_type ( double  val)
static

◆ get_property_from_handle()

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

◆ initialize_r()

◆ is_coplanar()

bool is_coplanar ( const Matrix cov)

Definition at line 9713 of file graphics.cc.

References EIG::eigenvalues(), ColumnVector::max(), ColumnVector::min(), and real().

Referenced by coplanar_partition().

◆ is_handle_visible() [1/3]

◆ is_handle_visible() [2/3]

◆ is_handle_visible() [3/3]

static bool is_handle_visible ( double  val)
static

◆ isfigure()

static bool isfigure ( double  val)
static

◆ ishghandle() [1/3]

static bool ishghandle ( const graphics_handle h)
static

Definition at line 3143 of file graphics.cc.

References octave_handle::ok().

Referenced by Fishghandle(), Fwaitfor(), and ishghandle().

◆ ishghandle() [2/3]

◆ ishghandle() [3/3]

static bool ishghandle ( double  val)
static

◆ lookup_object_name()

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

Definition at line 1130 of file graphics.cc.

References caseless_str::compare(), len, and name.

Referenced by property::create().

◆ magform()

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

Definition at line 7489 of file graphics.cc.

References abs(), octave::math::floor(), pow(), and x.

◆ make_graphics_handle()

static graphics_handle make_graphics_handle ( const std::string &  go_name,
const graphics_handle parent,
bool  integer_figure_handle = false,
bool  call_createfcn = true,
bool  notify_toolkit = true 
)
static

◆ make_graphics_object()

◆ make_graphics_object_from_type()

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 1209 of file graphics.cc.

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

◆ make_handle_fraction()

static double make_handle_fraction ( void  )
static

◆ max_axes_scale()

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

◆ norm()

◆ normalize()

void normalize ( ColumnVector v)
inline

Definition at line 5880 of file graphics.cc.

References scale().

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

◆ normalized_aspectratios()

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

Definition at line 6819 of file graphics.cc.

References octave::math::min().

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

◆ papersize_from_type()

static Matrix papersize_from_type ( const caseless_str  punits,
const caseless_str  ptype 
)
static

Definition at line 4410 of file graphics.cc.

References caseless_str::compare(), and retval.

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

◆ process_graphics_events()

static int process_graphics_events ( void  )
static

◆ reparent()

◆ scale() [1/2]

void scale ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5864 of file graphics.cc.

References x.

◆ scale() [2/2]

◆ screen_size_pixels()

◆ set_property_in_handle()

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

◆ toggle_warn()

static int toggle_warn ( std::string  id,
bool  on,
int  state = -1 
)
static

◆ transform()

◆ translate() [1/2]

void translate ( ColumnVector v,
double  x,
double  y,
double  z 
)
inline

Definition at line 5872 of file graphics.cc.

References x.

◆ translate() [2/2]

void translate ( Matrix m,
double  x,
double  y,
double  z 
)
inline

Definition at line 5852 of file graphics.cc.

References m, x, and xform_translate().

Referenced by octave::workspace_view::notice_settings(), and axes::properties::update_camera().

◆ unit_cube()

Matrix unit_cube ( void  )
inline

Definition at line 5911 of file graphics.cc.

References m.

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

◆ update_text_pos()

◆ validate_property_name()

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

◆ viridis_colormap()

static Matrix viridis_colormap ( void  )
static

Definition at line 139 of file graphics.cc.

References Array< T >::fortran_vec().

◆ waitfor_del_listener()

static octave_value_list waitfor_del_listener ( const octave_value_list args,
int   
)
static

Definition at line 14190 of file graphics.cc.

References ovl(), and waitfor_results.

Referenced by Fwaitfor().

◆ waitfor_listener()

◆ xcreatefcn()

static void xcreatefcn ( const graphics_handle h)
static

◆ xform()

◆ xform2cam()

RowVector xform2cam ( const ColumnVector v)
inline

Definition at line 5942 of file graphics.cc.

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

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

◆ xform_matrix()

Matrix xform_matrix ( void  )
inline

Definition at line 5781 of file graphics.cc.

References m.

Referenced by axes::properties::update_camera(), graphics_xform::xform_eye(), and xform_translate().

◆ xform_scale()

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

Definition at line 5820 of file graphics.cc.

References m, and x.

Referenced by scale().

◆ xform_translate()

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

Definition at line 5833 of file graphics.cc.

References m, x, and xform_matrix().

Referenced by translate().

◆ xform_vector() [1/2]

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

Definition at line 5802 of file graphics.cc.

References x.

◆ xform_vector() [2/2]

ColumnVector xform_vector ( void  )
inline

◆ xget()

◆ xinitialize()

static void xinitialize ( const graphics_handle h)
static

◆ xreset_default_properties()

◆ xset() [1/2]

◆ xset() [2/2]

static void xset ( const graphics_handle h,
const octave_value_list args 
)
static

◆ xset_gcbo()

Variable Documentation

◆ delete_executing

bool delete_executing = false
static

Definition at line 3052 of file graphics.cc.

Referenced by delete_graphics_objects(), and Fdrawnow().

◆ dprop_obj_map

std::map<caseless_str, graphics_object> dprop_obj_map
static

Definition at line 1966 of file graphics.cc.

Referenced by property::create().

◆ executing_callbacks

callback_props executing_callbacks
static

Definition at line 1938 of file graphics.cc.

Referenced by callback_property::execute(), and base_properties::is_handle_visible().

◆ updating_aspectratios

std::set<double> updating_aspectratios
static

◆ updating_axes_layout

bool updating_axes_layout = false
static

Definition at line 6161 of file graphics.cc.

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

◆ updating_axis_limits

std::set<double> updating_axis_limits
static

Definition at line 8437 of file graphics.cc.

Referenced by axes::update_axis_limits().

◆ updating_hggroup_limits

bool updating_hggroup_limits = false
static

Definition at line 10579 of file graphics.cc.

Referenced by hggroup::update_axis_limits().

◆ updating_patch_data

bool updating_patch_data = false
static

Definition at line 9627 of file graphics.cc.

◆ updating_title_position

bool updating_title_position = false
static

Definition at line 6751 of file graphics.cc.

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

◆ updating_xlabel_position

bool updating_xlabel_position = false
static

Definition at line 6413 of file graphics.cc.

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

◆ updating_ylabel_position

bool updating_ylabel_position = false
static

Definition at line 6518 of file graphics.cc.

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

◆ updating_zlabel_position

bool updating_zlabel_position = false
static

Definition at line 6623 of file graphics.cc.

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

◆ waitfor_results

std::map<uint32_t, bool> waitfor_results
static