protectedoverridevoidDrawContents(Gdk.Drawable d, Cairo.Context g,intwidth,intheight,boolscreenChanged){ g.SelectFontFace(Text.MONOSPACE_FONT, FontSlant.Normal, FontWeight.Bold); g.SetFontSize(24); Text.ShadowedText(g,"Level Up!", X + xs, Y + ys); } 开发者ID:skinitimski,项目名称:Revere...
cairo_set_font_face(cr, font->getFace());cairo_set_font_size(cr, fontSize); cairo_text_extents(cr,this->text.c_str(), &lastExtents);DimensionnewPreferred(lastExtents.width +3, lastExtents.height +3);// Set new preferred sizeif(getPreferredSize() != newPreferred) setPreferredSize(newP...
示例2: ComputeGeometry publicoverridevoidComputeGeometry(){base.ComputeGeometry();// compute the font sizeif(ParentControl !=null&& ParentControlisMenu) _lastFontSize = (ParentControlasMenu).FontSize;else_lastFontSize = DefaultFontSize;// compute the text extentsusing(varcr =newCairo.Context(Dumm...
publicoverridevoidDraw(CairoContextEx gr,intarea_width,intarea_height,boolrtl){constdoublefraction_size =0.17;doublex =0.5- (fractions_num * fraction_size /2), y = DrawAreaY +0.3;constdoubleoffset_x =0.12;base.Draw (gr, area_width, area_height, rtl); gr.SetPangoLargeFont...