Max 5 API Reference
00001 /** 00002 @defgroup ui User Interface 00003 00004 00005 00006 00007 @defgroup jgraphics JGraphics 00008 @ingroup ui 00009 00010 The JGraphics API provided in Max 5 is an interface for drawing based on the API for the Cairo vector graphics library 00011 ( http://en.wikipedia.org/wiki/Cairo_%28graphics%29 , http://cairographics.org/manual/ ). 00012 Internally, the drawing is rendered using JUCE ( http://rawmaterialsoftware.com/juce/ ), 00013 however JUCE functions cannot be called directly. 00014 00015 00016 00017 @defgroup jsurface JSurface 00018 @ingroup jgraphics 00019 00020 A surface is an abstract base class for something you render to. 00021 An image surface is a concrete instance that renders to an image in memory, essentially an offscreen bitmap. 00022 00023 00024 00025 @defgroup jsvg Scalable Vector Graphics 00026 @ingroup jgraphics 00027 00028 00029 @defgroup jfont JFont 00030 @ingroup jgraphics 00031 00032 00033 @defgroup jmatrix JGraphics Matrix Transformations 00034 @ingroup jgraphics 00035 00036 The #t_jmatrix is one way to represent a transformation. 00037 You can use the #t_jmatrix in the call to jgraphics_transform(), jgraphics_setmatrix(), and jgraphics_pattern_set_matrix 00038 for specifying transformations. 00039 00040 00041 00042 @defgroup jpattern JPattern 00043 @ingroup jgraphics 00044 00045 A pattern is like a brush that is used to fill a path with. 00046 It could be a solid color but it could also be an image. 00047 You can draw to a surface and then from that surface create a pattern that can be used to fill another surface. 00048 For example, jgraphics_patter_create_for_surface(). 00049 There are also gradients: see jgraphics_pattern_create_linear() and jgraphics_pattern_create_radial(). 00050 00051 00052 00053 @defgroup color Colors 00054 @ingroup jgraphics 00055 00056 00057 00058 00059 00060 @defgroup textfield TextField 00061 @ingroup jgraphics 00062 00063 The textfield is a high-level text display object that may be used by a UI object to represent text in a patcher. 00064 It is built on the lower-level @ref textlayout 00065 00066 00067 @defgroup textlayout TextLayout 00068 @ingroup jgraphics 00069 00070 A textlayout is lower-level text rendering object used by higher-level entities such as @ref textfield. 00071 00072 00073 @defgroup jpopupmenu Popup Menus 00074 @ingroup jgraphics 00075 00076 Popup menu API so externals can create popup menus that can also be drawn into. 00077 00078 00079 @defgroup boxlayer Box Layer 00080 @ingroup jgraphics 00081 00082 The boxlayer functions provide way to make it easier to use cached offscreen images (layers) in your drawing. 00083 The general idea is to do something like this: 00084 00085 @code 00086 t_jgraphics *g; 00087 g = jbox_start_layer(box, view, layername, width, height); 00088 if (g) { 00089 // draw to your new offscreen context here 00090 // the second time you call jbox_start_layer() it will return NULL 00091 // since you already drew it -- you don't have to do drawing the second time 00092 jbox_end_layer(box, view, layername); 00093 } 00094 jbox_paint_layer(box, view, layername, xpos, ypos); 00095 @endcode 00096 00097 Then, if something changes where you would need to redraw the layer you invalidate it: 00098 @code 00099 jbox_invalidate_layer(box, view, layername); 00100 @endcode 00101 or 00102 @code 00103 jbox_invalidate_layer(box, NULL, layername); // to invalidate for all views 00104 @endcode 00105 00106 Each view has its own layer stored since if a patcher has multiple views each could be at a different zoom level. 00107 00108 00109 00110 @defgroup jdataview DataView 00111 @ingroup ui 00112 00113 The jdataview object provides a mechanism to display data in a tabular format. 00114 In Max this is used internally for the implementation of the inspectors, file browser, preferences, and jit.cellblock object, among others. 00115 00116 A jdataview object does not contain the information that it presents. 00117 The object you create will maintain the data and then make the data available to the dataview using the provided api. 00118 00119 */ 00120
Copyright © 2008, Cycling '74