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


C# Android.Translate方法代码示例

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


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

示例1: OnDraw

        protected override void OnDraw(Android.Graphics.Canvas canvas)
        {
            base.OnDraw (canvas);

            TextPaint textPaint = Paint;
            textPaint.Color = new Android.Graphics.Color(CurrentTextColor);
            textPaint.DrawableState = GetDrawableState ();

            canvas.Save();

            if ( TopDown )
            {
                canvas.Translate( Width, 0 );
                canvas.Rotate( 90 );
            }
            else
            {
                canvas.Translate( 0, Height );
                canvas.Rotate( -90 );
            }

            canvas.Translate (CompoundPaddingLeft, ExtendedPaddingTop);

            Layout.Draw (canvas);
            //			getLayout().draw( canvas );
            canvas.Restore ();
            //			canvas.restore();
        }
开发者ID:pafik13,项目名称:pharm-merch-tablet,代码行数:28,代码来源:VerticalTextView.cs

示例2: OnDraw

        protected override void OnDraw(Android.Graphics.Canvas canvas)
        {
            if (this.Orientation == Orientation.Vertical)
            {
                canvas.Rotate(-90);
                canvas.Translate(-Height, 0);
            }

            base.OnDraw(canvas);
        }
开发者ID:evnik,项目名称:UIFramework,代码行数:10,代码来源:Slider.Droid.cs

示例3: OnDraw

        protected override void OnDraw(Android.Graphics.Canvas canvas)
        {
            var textPaint = this.Paint;
            textPaint.Color = new Color(this.CurrentTextColor);

            canvas.Save();

            if (m_TopDown)
            {
                canvas.Translate(this.Width, 0);
                canvas.Rotate(90.0f);
            }
            else
            {
                canvas.Translate(0, this.Height);
                canvas.Rotate(-90.0f);
            }

            canvas.Translate(this.CompoundPaddingLeft, this.ExtendedPaddingTop);
            this.Layout.Draw(canvas);
            canvas.Restore();
        }
开发者ID:jamesmontemagno,项目名称:MonoDroidToolkit,代码行数:22,代码来源:VerticalTextView.cs

示例4: DispatchDraw

        protected override void DispatchDraw(Android.Graphics.Canvas canvas)
        {
            base.DispatchDraw (canvas);

            if (opened || isTracking || animator != null) {
                // Draw inset shadow on the menu
                canvas.Save ();
                shadowDrawable.SetBounds (0, 0, Context.ToPixels (8), Height);
                canvas.Translate (ContentView.Left - shadowDrawable.Bounds.Width (), 0);
                shadowDrawable.Draw (canvas);
                canvas.Restore ();

                if (contentOffsetX != 0) {
                    // Cover the area with a black overlay to display openess graphically
                    var openness = ((float)(MaxOffset - contentOffsetX)) / MaxOffset;
                    overlayPaint.Alpha = Math.Max (0, (int)(MaxOverlayAlpha * openness));
                    if (overlayPaint.Alpha > 0)
                        canvas.DrawRect (0, 0, ContentView.Left, Height, overlayPaint);
                }
            }
        }
开发者ID:howsgame,项目名称:howsgame,代码行数:21,代码来源:FlyOutContainer.cs

示例5: Draw

 public override void Draw(Android.Graphics.Canvas canvas)
 {
     canvas.Rotate(-90);
     canvas.Translate(-Height, 0);
     base.OnDraw(canvas);
 }
开发者ID:Cheesebaron,项目名称:MonoDroid.VerticalSeekBar,代码行数:6,代码来源:VerticalSeekBar.cs

示例6: DispatchDraw

        protected override void DispatchDraw(Android.Graphics.Canvas canvas)
        {
            base.DispatchDraw (canvas);

            if (mPinnedShadow != null) {

                // prepare variables
                int pLeft = ListPaddingLeft;
                int pTop = ListPaddingTop;
                View view = mPinnedShadow.View;

                // draw child
                canvas.Save ();
                canvas.ClipRect (pLeft, pTop, pLeft + view.Width, pTop + view.Height);
                canvas.Translate (pLeft, pTop + mTranslateY);
                DrawChild (canvas, mPinnedShadow.View, DrawingTime);
                canvas.Restore ();
            }
        }
开发者ID:renato-almeida,项目名称:pinned-section-listview-sharp,代码行数:19,代码来源:PinnedSectionListView.cs

示例7: Draw

            public override void Draw(Android.Graphics.Canvas canvas)
            {
                if (Control == null) return;

                Control.CreateGraphicBuffers();

                var ctime = System.Environment.TickCount;
                Fleux.UIElements.Canvas.drawtime = 0;

                if (Control.offUpdated)
                {
                    lock(Control.offBmp)
                    {

                        Control.Draw(new PaintEventArgs(Control.offGr, new Rectangle(0,0, Control.offBmp.Width, Control.offBmp.Height)));

                        updcnt++;
                    }
                }
                Control.offUpdated = false;

                lock(Control.offBmp)
                {
                    if (Fleux.Core.FleuxApplication.HorizontalMirror)
                    {
                        canvas.Save();
                        canvas.Scale (-1, 1);
                        canvas.Translate (-(float)Control.drect.Width(), 0);
                    }else if (Fleux.Core.FleuxApplication.VerticalMirror)
                    {
                        canvas.Save();
                        canvas.Scale (1, -1);
                        canvas.Translate (0, -(float)Control.drect.Height());
                    }

                    Control.offGr.Flush();

                    canvas.DrawBitmap(Control.offBmp.ABitmap, Control.srect, Control.drect, paint);

                    updcntflush++;
                }
                if (PerfData)
                {
                    ctime = System.Environment.TickCount - ctime;
                    {
                        totime += ctime;
                    }
                    var cavg = totime / (updcnt+1);

                    var cpaint = new Android.Graphics.Paint();
                    cpaint.Color = new Android.Graphics.Color(0xA0, 0xFF, 0xFF, 0xFF);
                    cpaint.SetStyle(Android.Graphics.Paint.Style.Fill);
                    canvas.DrawRect(0,0, 250, 20, cpaint);
                    canvas.DrawText(""+updcnt+":"+updcntflush+":"+updcntinval+" ctime: "+ctime+"cavg:"+cavg+" canv: "+Fleux.UIElements.Canvas.drawtime, 0,20, spaint);
                    cpaint.Dispose();
                    if (updcnt > 100)
                    {
                        totime = 0;
                        updcnt = 0;
                    }
                }
            }
开发者ID:cail,项目名称:fleux,代码行数:62,代码来源:DoubleBufferedControl.cs


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