本文整理汇总了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();
}
示例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);
}
示例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();
}
示例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);
}
}
}
示例5: Draw
public override void Draw(Android.Graphics.Canvas canvas)
{
canvas.Rotate(-90);
canvas.Translate(-Height, 0);
base.OnDraw(canvas);
}
示例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 ();
}
}
示例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;
}
}
}