def flps_init(): """flps_init() -> ptr_flpscontrol Customizes the output by changing the PostScript output control parameters. Returns ------- ptr_flpscontrol : pointer to xfdata.FLPS_CONTROL xfdata.FLPS_CONTROL class instance Examples -------- >>> pflpsCntrl = flps_init() Notes ----- Status: NN-UTest + Doc + NoDemo = Maybe """ _flps_init = library.cfuncproto( library.load_so_libflimage(), "flps_init", cty.POINTER(xfdata.FLPS_CONTROL), [], """FLPS_CONTROL * flps_init()""") library.check_if_flinitialized() retval = _flps_init() return retval
def fl_object_ps_dump(ptr_flobject, fname): """fl_object_ps_dump(ptr_flobject, fname) -> result Finds out hardcopies of some flobjects in a what-you-see-is-what-you-get (WYSIWYG) way, especially those that are dynamic and of vector-graphics in nature. It outputs the specified flobject in PostScript. The flobject must be visible at the time of the function call. The hardcopy should mostly be WYSIWYG and centered on the printed page. The orientation is determined such that a balanced margin results, i.e., if the width of the flobject is larger than the height, landscape mode will be used. Further, if the flobject is too big to fit on the printed page, a scale factor will be applied so the flobject fits. The box underneath the flobject is by default not drawn and in the default black&white mode, all curves are drawn in black. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT object. Only the xfdata.FL_XYPLOT flobject is supported. fname : str name of output file. If it is empty (""), a fselector will be shown to ask the user for a file name. Returns ------- result : int 0 (on success), or -1 (on errors) Examples -------- >>> if fl_object_ps_dump(pxyplobj, "myhardcopy.ps") < 0: >>> ... <something> Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_object_ps_dump = library.cfuncproto( library.load_so_libflimage(), "fl_object_ps_dump", cty.c_int, [cty.POINTER(xfdata.FL_OBJECT), xfdata.STRING], """int fl_object_ps_dump(FL_OBJECT * ob, const char * fname)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) s_fname = library.convert_to_bytestrc(fname) library.keep_elem_refs(ptr_flobject, fname, s_fname) retval = _fl_object_ps_dump(ptr_flobject, s_fname) return retval