当前位置: 首页>>代码示例>>C#>>正文


C# Context.FillStrokedRectangle方法代码示例

本文整理汇总了C#中Cairo.Context.FillStrokedRectangle方法的典型用法代码示例。如果您正苦于以下问题:C# Context.FillStrokedRectangle方法的具体用法?C# Context.FillStrokedRectangle怎么用?C# Context.FillStrokedRectangle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cairo.Context的用法示例。


在下文中一共展示了Context.FillStrokedRectangle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DrawShape

        protected override Rectangle DrawShape(Rectangle rect, Layer l)
        {
            Rectangle dirty;

            using (Context g = new Context (l.Surface)) {
                g.AppendPath (PintaCore.Layers.SelectionPath);
                g.FillRule = FillRule.EvenOdd;
                g.Clip ();

                g.Antialias = Antialias.Subpixel;

                if (FillShape && StrokeShape)
                    dirty = g.FillStrokedRectangle (rect, fill_color, outline_color, BrushWidth);
                else if (FillShape)
                    dirty = g.FillRectangle (rect, outline_color);
                else
                    dirty = g.DrawRectangle (rect, outline_color, BrushWidth);
            }

            return dirty;
        }
开发者ID:joehillen,项目名称:Pinta,代码行数:21,代码来源:RectangleTool.cs

示例2: DrawShape

        protected override Rectangle DrawShape(Rectangle rect, Layer l)
        {
            Document doc = PintaCore.Workspace.ActiveDocument;

            Rectangle dirty;

            using (Context g = new Context (l.Surface)) {
                g.AppendPath (doc.SelectionPath);
                g.FillRule = FillRule.EvenOdd;
                g.Clip ();

                g.Antialias = UseAntialiasing ? Antialias.Subpixel : Antialias.None;

                if (FillShape && StrokeShape)
                    dirty = g.FillStrokedRectangle (rect, fill_color, outline_color, BrushWidth);
                else if (FillShape)
                    dirty = g.FillRectangle (rect, outline_color);
                else
                    dirty = g.DrawRectangle (rect, outline_color, BrushWidth);
            }

            return dirty;
        }
开发者ID:RodH257,项目名称:Pinta,代码行数:23,代码来源:RectangleTool.cs

示例3: UpdateRectangle

        protected void UpdateRectangle(PointD point)
        {
            if (!is_drawing)
                return;

            Rectangle r = PointsToRectangle (shape_origin, point);
            Rectangle dirty;

            PintaCore.Layers.ToolLayer.Clear ();
            PintaCore.Layers.ToolLayer.Hidden = false;

            using (Context g = new Context (PintaCore.Layers.ToolLayer.Surface)) {
                g.Antialias = Antialias.Subpixel;

                dirty = g.FillStrokedRectangle (r, new Color (0, 0.4, 0.8, 0.1), new Color (0, 0, 0.9), 1);
                dirty = dirty.Clamp ();

                PintaCore.Workspace.Invalidate (last_dirty.ToGdkRectangle ());
                PintaCore.Workspace.Invalidate (dirty.ToGdkRectangle ());

                last_dirty = dirty;
            }
        }
开发者ID:xxgreg,项目名称:Pinta,代码行数:23,代码来源:ZoomTool.cs

示例4: Render

 public void Render (Context g)
 {
     var rect = GetHandleRect ();
     g.FillStrokedRectangle (rect, FillColor, StrokeColor, 1);
 }
开发者ID:msiyer,项目名称:Pinta,代码行数:5,代码来源:ToolControl.cs


注:本文中的Cairo.Context.FillStrokedRectangle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。