nobody at rubyforge.org
2007-Mar-27 20:26 UTC
[Wxruby-development] [922] branches/wxruby2/wxwidgets_282: Changes, additions and deprecations 2.6 -> 2.8 Wx API
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:'':'';} #msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[922] branches/wxruby2/wxwidgets_282: Changes, additions and deprecations 2.6 -> 2.8 Wx API</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>922</dd> <dt>Author</dt> <dd>brokentoy</dd> <dt>Date</dt> <dd>2007-03-27 16:26:51 -0400 (Tue, 27 Mar 2007)</dd> </dl> <h3>Log Message</h3> <pre>Changes, additions and deprecations 2.6 -> 2.8 Wx API</pre> <h3>Modified Paths</h3> <ul> <li><a href="#brancheswxruby2wxwidgets_282doctextiledctxtl">branches/wxruby2/wxwidgets_282/doc/textile/dc.txtl</a></li> <li><a href="#brancheswxruby2wxwidgets_282swigclassesincludewxDCh">branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="brancheswxruby2wxwidgets_282doctextiledctxtl"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/doc/textile/dc.txtl (921 => 922)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/doc/textile/dc.txtl        2007-03-27 18:09:14 UTC (rev 921) +++ branches/wxruby2/wxwidgets_282/doc/textile/dc.txtl        2007-03-27 20:26:51 UTC (rev 922) </span><span class="lines">@@ -14,6 +14,14 @@ </span><span class="cx"> two @Coord@ ones or @Point@ and @Size@ instead of four of </span><span class="cx"> them. </span><span class="cx"> </span><ins>+h2. Support for Transparency / Alpha Channel + +On Mac OS X when using Core Graphics (_MAC_USE_CORE_GRAPHICS set to 1) +colors with alpha are supported, so instances of "Pen":pen.html or +"Brush":brush.html that are built from "Colour":colour.html use the +color''s alpha values when stroking or filling. + + </ins><span class="cx"> h2. Derived from </span><span class="cx"> </span><span class="cx"> "Object":object.html </span><span class="lines">@@ -27,7 +35,6 @@ </span><span class="cx"> h2. Methods </span><span class="cx"> </span><span class="cx"> * "DC.new":#DC_new </span><del>-* "DC#begin_drawing":#DC_begindrawing </del><span class="cx"> * "DC#blit":#DC_blit </span><span class="cx"> * "DC#cache_enabled":#DC_cacheenabled </span><span class="cx"> * "DC#calc_bounding_box":#DC_calcboundingbox </span><span class="lines">@@ -60,7 +67,6 @@ </span><span class="cx"> * "DC#draw_text":#DC_drawtext </span><span class="cx"> * "DC#enable_cache":#DC_enablecache </span><span class="cx"> * "DC#end_doc":#DC_enddoc </span><del>-* "DC#end_drawing":#DC_enddrawing </del><span class="cx"> * "DC#end_page":#DC_endpage </span><span class="cx"> * "DC#flood_fill":#DC_floodfill </span><span class="cx"> * "DC#get_background":#DC_getbackground </span><span class="lines">@@ -70,8 +76,10 @@ </span><span class="cx"> * "DC#get_char_width":#DC_getcharwidth </span><span class="cx"> * "DC#get_clipping_box":#DC_getclippingbox </span><span class="cx"> * "DC#get_font":#DC_getfont </span><ins>+* "DC#get_layout_direction":#DC_getlayoutdirection </ins><span class="cx"> * "DC#get_logical_function":#DC_getlogicalfunction </span><span class="cx"> * "DC#get_map_mode":#DC_getmapmode </span><ins>+* "DC#get_multi_line_text_extent":#DC_getmultilinetextextent </ins><span class="cx"> * "DC#get_partial_text_extents":#DC_getpartialtextextents </span><span class="cx"> * "DC#get_pen":#DC_getpen </span><span class="cx"> * "DC#get_pixel":#DC_getpixel </span><span class="lines">@@ -82,6 +90,8 @@ </span><span class="cx"> * "DC#get_text_extent":#DC_gettextextent </span><span class="cx"> * "DC#get_text_foreground":#DC_gettextforeground </span><span class="cx"> * "DC#get_user_scale":#DC_getuserscale </span><ins>+* "DC#gradient_fill_concentric":#DC_gradientfillconcentric +* "DC#gradient_fill_linear":#DC_gradientfilllinear </ins><span class="cx"> * "DC#logical_to_device_x":#DC_logicaltodevicex </span><span class="cx"> * "DC#logical_to_device_xrel":#DC_logicaltodevicexrel </span><span class="cx"> * "DC#logical_to_device_y":#DC_logicaltodevicey </span><span class="lines">@@ -90,7 +100,7 @@ </span><span class="cx"> * "DC#max_y":#DC_maxy </span><span class="cx"> * "DC#min_x":#DC_minx </span><span class="cx"> * "DC#min_y":#DC_miny </span><del>-* "DC#ok":#DC_ok </del><ins>+* "DC#is_ok":#DC_isok </ins><span class="cx"> * "DC#reset_bounding_box":#DC_resetboundingbox </span><span class="cx"> * "DC#set_axis_orientation":#DC_setaxisorientation </span><span class="cx"> * "DC#set_background":#DC_setbackground </span><span class="lines">@@ -99,6 +109,7 @@ </span><span class="cx"> * "DC#set_clipping_region":#DC_setclippingregion </span><span class="cx"> * "DC#set_device_origin":#DC_setdeviceorigin </span><span class="cx"> * "DC#set_font":#DC_setfont </span><ins>+* "DC#set_layout_direction":#DC_setlayoutdirection </ins><span class="cx"> * "DC#set_logical_function":#DC_setlogicalfunction </span><span class="cx"> * "DC#set_map_mode":#DC_setmapmode </span><span class="cx"> * "DC#set_palette":#DC_setpalette </span><span class="lines">@@ -115,18 +126,6 @@ </span><span class="cx"> </span><span class="cx"> h3(#DC_new). DC.new </span><span class="cx"> </span><del>- *destructor*() - -Destructor. - - -h3(#DC_begindrawing). DC#begin_drawing - - *begin_drawing*() - -This is deprecated and does nothing. Don''t use. - - </del><span class="cx"> h3(#DC_blit). DC#blit </span><span class="cx"> </span><span class="cx"> Boolean *blit*(%(arg-type)Coord% xdest, %(arg-type)Coord% ydest, %(arg-type)Coord% width, </span><span class="lines">@@ -646,14 +645,6 @@ </span><span class="cx"> </span><span class="cx"> Ends a document (only relevant when outputting to a printer). </span><span class="cx"> </span><del>- -h3(#DC_enddrawing). DC#end_drawing - - *end_drawing*() - -This is deprecated and does nothing. Don''t use. - - </del><span class="cx"> h3(#DC_endpage). DC#end_page </span><span class="cx"> </span><span class="cx"> *end_page*() </span><span class="lines">@@ -728,16 +719,24 @@ </span><span class="cx"> Gets the rectangle surrounding the current clipping region. </span><span class="cx"> </span><span class="cx"> </span><ins>+h3(#DC_getfont). DC#get_font </ins><span class="cx"> </span><ins>+ "Font":font.html *get_font*() </ins><span class="cx"> </span><ins>+Gets the current font (see "DC#set_font":dc.html#DC_setfont). </ins><span class="cx"> </span><ins>+h3(#DC_getlayoutdirection). DC#get_layout_direction </ins><span class="cx"> </span><del>-h3(#DC_getfont). DC#get_font </del><ins>+ "LayoutDirection":layoutdirection.html *get_layout_direction*() </ins><span class="cx"> </span><del>- "Font":font.html *get_font*() </del><ins>+Gets the current layout direction of the device context. On platforms where RTL layout +is supported, the return value will either be @Layout_LeftToRight@ or +@Layout_RightToLeft@. If RTL layout is not supported, the return value will +be @Layout_Default@. </ins><span class="cx"> </span><del>-Gets the current font (see "DC#set_font":dc.html#DC_setfont). </del><ins>+h4. See also </ins><span class="cx"> </span><ins>+"set_layout_direction":#DC_setlayoutdirection </ins><span class="cx"> </span><span class="cx"> h3(#DC_getlogicalfunction). DC#get_logical_function </span><span class="cx"> </span><span class="lines">@@ -834,31 +833,25 @@ </span><span class="cx"> </span><span class="cx"> h3(#DC_gettextextent). DC#get_text_extent </span><span class="cx"> </span><del>- *get_text_extent*(%(arg-type)String% string, %(arg-type)Coord% w, %(arg-type)Coord% h, - - %(arg-type)Coord% descent = nil, - %(arg-type)Coord% externalLeading = nil, - %(arg-type)Font% font = nil) </del><ins>+ Integer w, Integer h, + Integer descent, + Integer external_leading = *get_text_extent*(%(arg-type)String% string, +                                                   %(arg-type)Font% font = nil) </ins><span class="cx"> </span><span class="cx"> Gets the dimensions of the string using the currently selected font. </span><del>-_string_ is the text string to measure, _w_ and _h_ are -the total width and height respectively, _descent_ is the -dimension from the baseline of the font to the bottom of the -descender, and _externalLeading_ is any extra vertical space added -to the font by the font designer (usually is zero). - -The optional parameter _font_ specifies an alternative -to the currently selected font: but note that this does not -yet work under Windows, so you need to set a font for </del><ins>+_string_ is the text string to measure, and the optional parameter +_font_ specifies an alternative to the currently selected font: but note +that this does not yet work under Windows, so you need to set a font for </ins><span class="cx"> the device context first. </span><span class="cx"> </span><ins>+The method returns an array of values. _w_ and _h_ are the total width +and height respectively, _descent_ is the dimension from the baseline of +the font to the bottom of the descender, and _external_leading_ is any +extra vertical space added to the font by the font designer. This is +usually zero. + </ins><span class="cx"> See also "Font":font.html, "DC#set_font":dc.html#DC_setfont. </span><span class="cx"> </span><del>- - - - - </del><span class="cx"> h3. DC#get_text_foreground </span><span class="cx"> </span><span class="cx"> "Colour":colour.html *get_text_foreground*() </span><span class="lines">@@ -872,9 +865,28 @@ </span><span class="cx"> </span><span class="cx"> Gets the current user scale factor (set by "set_user_scale":#DC_setuserscale). </span><span class="cx"> </span><ins>+h3. DC#gradient_fill_concentric </ins><span class="cx"> </span><ins>+ *gradient_fill_concentric*(%(arg-type)Rect% rect, %(arg-type)Colour% initial_colour, + %(arg-type)Colour% dest_colour, %(arg-type)Point% centre = nil ) </ins><span class="cx"> </span><ins>+Fill the area specified by rect with a radial gradient, starting from +_initial_colour_ at the centre of the circle and fading to _dest_colour_ on +the circle outside. </ins><span class="cx"> </span><ins>+_centre_ is the relative coordinates of centre of the circle in the +specified rect. If not specified, the circle is placed at the centre of +rect. + +*Note*: Currently this function is very slow, don''t use it for real-time drawing. + +h3. DC#gradient_fill_linear + + *gradient_fill_concentric*(%(arg-type)Rect% rect, %(arg-type)Colour% initial_colour, + %(arg-type)Colour% dest_colour, %(arg-type)Direction% dir = @Wx::EAST@ ) + +Fill the area specified by rect with a linear gradient, starting from initialColour and eventually fading to destColour. The nDirection specifies the direction of the colour change, default is to use initialColour on the left part of the rectangle and destColour on the right one. + </ins><span class="cx"> h3. DC#logical_to_device_x </span><span class="cx"> </span><span class="cx"> "Coord":coord.html *logical_to_device_x*(%(arg-type)Coord% x) </span><span class="lines">@@ -937,9 +949,9 @@ </span><span class="cx"> Gets the minimum vertical extent used in drawing commands so far. </span><span class="cx"> </span><span class="cx"> </span><del>-h3. DC#ok </del><ins>+h3. DC#is_ok </ins><span class="cx"> </span><del>- Boolean *ok*() </del><ins>+ Boolean *is_ok*() </ins><span class="cx"> </span><span class="cx"> Returns true if the DC is ok to use. </span><span class="cx"> </span><span class="lines">@@ -1051,6 +1063,16 @@ </span><span class="cx"> See also "Font":font.html. </span><span class="cx"> </span><span class="cx"> </span><ins>+h3. DC#set_layout_direction + + *set_layout_direction*(%(arg-type)LayoutDirection% dir) + +Sets the current layout direction for the device context. _dir_ may be +either @Wx::LAYOUT_DEFAULT@, @Wx::LAYOUT_LEFT_TO_RIGHT@ or +@Wx::LAYOUT_RIGHT_TO_LEFT@. + +See also "get_layout_direction":#DC_getlayoutdirection + </ins><span class="cx"> h3. DC#set_logical_function </span><span class="cx"> </span><span class="cx"> *set_logical_function*(%(arg-type)Integer% function) </span></span></pre></div> <a id="brancheswxruby2wxwidgets_282swigclassesincludewxDCh"></a> <div class="modfile"><h4>Modified: branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h (921 => 922)</h4> <pre class="diff"><span> <span class="info">--- branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h        2007-03-27 18:09:14 UTC (rev 921) +++ branches/wxruby2/wxwidgets_282/swig/classes/include/wxDC.h        2007-03-27 20:26:51 UTC (rev 922) </span><span class="lines">@@ -8,7 +8,6 @@ </span><span class="cx"> public: </span><span class="cx"> wxDC() ; </span><span class="cx"> virtual ~wxDC() ; </span><del>- void BeginDrawing() ; </del><span class="cx"> virtual bool Blit(wxCoord xdest , wxCoord ydest , wxCoord width , wxCoord height , wxDC* source , wxCoord xsrc , wxCoord ysrc , int logicalFunc = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1) = 0; </span><span class="cx"> static bool CacheEnabled() ; </span><span class="cx"> void CalcBoundingBox(wxCoord x , wxCoord y ) ; </span><span class="lines">@@ -46,7 +45,6 @@ </span><span class="cx"> virtual void DrawText(const wxString& text , wxCoord x , wxCoord y ) = 0; </span><span class="cx"> static void EnableCache(bool enableCache ) ; </span><span class="cx"> void EndDoc() ; </span><del>- void EndDrawing() ; </del><span class="cx"> void EndPage() ; </span><span class="cx"> bool FloodFill(wxCoord x , wxCoord y , const wxColour& colour , int style = wxFLOOD_SURFACE) ; </span><span class="cx"> //wxBrush& GetBackground(); </span><span class="lines">@@ -59,6 +57,7 @@ </span><span class="cx"> void GetClippingBox(wxCoord *x , wxCoord *y , wxCoord *width , wxCoord *height ) ; </span><span class="cx"> //wxFont& GetFont(); </span><span class="cx"> const wxFont& GetFont() const; </span><ins>+ wxLayoutDirection GetLayoutDirection() const; </ins><span class="cx"> int GetLogicalFunction() ; </span><span class="cx"> int GetMapMode() ; </span><span class="cx"> // bool GetOptimization() ; </span><span class="lines">@@ -77,6 +76,9 @@ </span><span class="cx"> //wxColour& GetTextForeground(); </span><span class="cx"> const wxColour& GetTextForeground() const; </span><span class="cx"> void GetUserScale(double *x , double *y ) ; </span><ins>+ void GradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour); + void GradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter); + void GradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST); </ins><span class="cx"> wxCoord LogicalToDeviceX(wxCoord x ) ; </span><span class="cx"> wxCoord LogicalToDeviceXRel(wxCoord x ) ; </span><span class="cx"> wxCoord LogicalToDeviceY(wxCoord y ) ; </span><span class="lines">@@ -85,7 +87,7 @@ </span><span class="cx"> wxCoord MaxY() ; </span><span class="cx"> wxCoord MinX() ; </span><span class="cx"> wxCoord MinY() ; </span><del>- bool Ok() ; </del><ins>+ bool IsOk(); </ins><span class="cx"> void ResetBoundingBox() ; </span><span class="cx"> void SetAxisOrientation(bool xLeftRight , bool yBottomUp ) ; </span><span class="cx"> void SetDeviceOrigin(wxCoord x , wxCoord y ) ; </span><span class="lines">@@ -95,6 +97,7 @@ </span><span class="cx"> void SetClippingRegion(const wxPoint& pt , const wxSize& sz ) ; </span><span class="cx"> void SetClippingRegion(const wxRect& rect ) ; </span><span class="cx"> void SetClippingRegion(const wxRegion& region ) ; </span><ins>+ void SetLayoutDirection(wxLayoutDirection dir); </ins><span class="cx"> virtual void SetPalette(const wxPalette& palette ) = 0; </span><span class="cx"> virtual void SetBrush(const wxBrush& brush ) = 0; </span><span class="cx"> virtual void SetFont(const wxFont& font ) = 0; </span></span></pre> </div> </div> </body> </html>
Reasonably Related Threads
- [929] branches/wxruby2/wxwidgets_282/swig/classes: Fix virtual methods that shouldn''t be (Bug 9682); Add missing methods and
- enum arguments not recognized
- [883] branches/wxruby2/wxwidgets_282/swig: API changes for move to WxWidgets 2.8
- [724] trunk/wxruby2: Initial commit of HtmlWindow functionality
- [708] trunk/wxruby2/swig/classes/DC.i: Un-ignore get_multi_line_text_extent (Roy Sutton)