本文整理汇总了C#中Android.Graphics.Paint.SetAntiAlias方法的典型用法代码示例。如果您正苦于以下问题:C# Paint.SetAntiAlias方法的具体用法?C# Paint.SetAntiAlias怎么用?C# Paint.SetAntiAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Graphics.Paint
的用法示例。
在下文中一共展示了Paint.SetAntiAlias方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LunarThread
public LunarThread(LunarView view, ISurfaceHolder surfaceHolder, Context context, Handler handler)
{
// get handles to some important objects
this.view = view;
mSurfaceHolder = surfaceHolder;
mHandler = handler;
view.mContext = context;
Resources res = context.Resources;
// cache handles to our key sprites & other drawables
mLanderImage = context.Resources.GetDrawable(R.Drawables.lander_plain);
mFiringImage = context.Resources.GetDrawable(R.Drawables.lander_firing);
mCrashedImage = context.GetResources().GetDrawable(R.Drawables.lander_crashed);
// load background image as a Bitmap instead of a Drawable b/c
// we don't need to transform it and it's faster to draw this way
mBackgroundImage = BitmapFactory.DecodeResource(res, R.Drawables.earthrise);
// Use the regular lander image as the model size for all sprites
mLanderWidth = mLanderImage.IntrinsicWidth;
mLanderHeight = mLanderImage.IntrinsicHeight;
// Initialize paints for speedometer
mLinePaint = new Paint();
mLinePaint.SetAntiAlias(true);
mLinePaint.SetARGB(255, 0, 255, 0);
mLinePaintBad = new Paint();
mLinePaintBad.SetAntiAlias(true);
mLinePaintBad.SetARGB(255, 120, 180, 0);
mScratchRect = new RectF(0, 0, 0, 0);
mWinsInARow = 0;
mDifficulty = DIFFICULTY_MEDIUM;
// initial show-up of lander (not yet playing)
mX = mLanderWidth;
mY = mLanderHeight * 2;
mFuel = PHYS_FUEL_INIT;
mDX = 0;
mDY = 0;
mHeading = 0;
mEngineFiring = true;
}
示例2: GameScreen
public GameScreen(IGame game)
: base(game)
{
// Initialize game objects here
bg1 = new Background(0, 0);
bg2 = new Background(2160, 0);
robot = new Robot();
hb = new Heliboy(340, 360);
hb2 = new Heliboy(700, 360);
character = Assets.character;
character2 = Assets.character2;
character3 = Assets.character3;
heliboy = Assets.heliboy;
heliboy2 = Assets.heliboy2;
heliboy3 = Assets.heliboy3;
heliboy4 = Assets.heliboy4;
heliboy5 = Assets.heliboy5;
anim = new Animation();
anim.addFrame(character, 1250);
anim.addFrame(character2, 50);
anim.addFrame(character3, 50);
anim.addFrame(character2, 50);
hanim = new Animation();
hanim.addFrame(heliboy, 100);
hanim.addFrame(heliboy2, 100);
hanim.addFrame(heliboy3, 100);
hanim.addFrame(heliboy4, 100);
hanim.addFrame(heliboy5, 100);
hanim.addFrame(heliboy4, 100);
hanim.addFrame(heliboy3, 100);
hanim.addFrame(heliboy2, 100);
currentSprite = anim.getImage();
loadMap();
// Defining a paint object
paint1 = new Paint();
paint1.SetTextSize(30);
paint1.SetTextAlign(Paint.Align.CENTER);
paint1.SetAntiAlias(true);
paint1.SetColor(Color.WHITE);
paint2 = new Paint();
paint2.SetTextSize(100);
paint2.SetTextAlign(Paint.Align.CENTER);
paint2.SetAntiAlias(true);
paint2.SetColor(Color.WHITE);
}