On Mar 20, 2012, at 12:14 PM, GigaNTes wrote:
> I need to render a rectangle of the specific color.

There are at least two different ways to do this, depending on how you want to 
use it. You could create a custom View [0] and override View.OnDraw() [1] to 
draw a rectangle; for example, ApiDemo [2] has an example that uses 
Canvas.DrawCircle()[3] to draw a circle.

Alternatively, you can use OpenTK if you need to use OpenGLES support.

If you just need a rectangle, using the Canvas API is the simpler solution.

 - Jon

[0] http://androidapi.xamarin.com/?link=T:Android.Views.View

[1] http://androidapi.xamarin.com/?link=M:Android.Views.View.OnDraw

[2] 
https://github.com/xamarin/monodroid-samples/blob/master/ApiDemo/Graphics/Layers.cs#L38

[3] http://androidapi.xamarin.com/?link=M:Android.Graphics.Canvas.DrawCircle

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to