當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。