예제 #1
0
파일: TextLayout.cs 프로젝트: garuma/xwt
 public TextLayout(Canvas canvas)
 {
     ToolkitEngine = canvas.Surface.ToolkitEngine;
     handler = ToolkitEngine.TextLayoutBackendHandler;
     Backend = handler.Create ((ICanvasBackend)Toolkit.GetBackend (canvas));
     Font = canvas.Font;
 }
예제 #2
0
파일: TextLayout.cs 프로젝트: Sinien/xwt
 public TextLayout()
 {
     handler = ToolkitEngine.TextLayoutBackendHandler;
     Backend = handler.Create ();
     Font = Font.SystemFont;
     Setup ();
 }
예제 #3
0
파일: TextLayout.cs 프로젝트: Gaushick/xwt
 internal TextLayout(Toolkit tk)
 {
     ToolkitEngine = tk;
     handler = ToolkitEngine.TextLayoutBackendHandler;
     Backend = handler.Create ();
     Setup ();
 }
예제 #4
0
파일: TextLayout.cs 프로젝트: Sinien/xwt
 public TextLayout(Canvas canvas)
 {
     ToolkitEngine = canvas.Surface.ToolkitEngine;
     handler = ToolkitEngine.TextLayoutBackendHandler;
     Backend = handler.Create ();
     Font = canvas.Font;
     Setup ();
 }
예제 #5
0
파일: TextLayout.cs 프로젝트: garuma/xwt
 public TextLayout(Context ctx)
 {
     ToolkitEngine = ctx.ToolkitEngine;
     handler = ToolkitEngine.TextLayoutBackendHandler;
     Backend = handler.Create (ctx);
 }
예제 #6
0
파일: TextLayout.cs 프로젝트: Sinien/xwt
 internal void InitForToolkit(Toolkit tk)
 {
     if (ToolkitEngine == null || ToolkitEngine != tk) {
         // If this is a re-initialization we dispose the previous state
         if (handler != null) {
             Dispose ();
             GC.ReRegisterForFinalize (this);
         }
         ToolkitEngine = tk;
         handler = ToolkitEngine.TextLayoutBackendHandler;
         Backend = handler.Create ();
         Setup ();
         font = (Font)tk.ValidateObject (font);
         if (font != null)
             handler.SetFont (Backend, font);
         if (text != null)
             handler.SetText (Backend, text);
         if (width != -1)
             handler.SetWidth (Backend, width);
         if (height != -1)
             handler.SetHeight (Backend, height);
         if (attributes != null && attributes.Count > 0)
             foreach (var attr in attributes)
                 handler.AddAttribute (Backend, attr);
     }
 }