Missing overlapped annotations

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing overlapped annotations

Naresh
This post was updated on .


Hi,
  While I'm trying to draw cross lines on iPad view , Its erasing the overlapped part of previous line. I'm using setNeedsDisplayInRect() method to refresh drawings. please suggest me to overcome this issue.

code that I wrote for this
   I'm using the below code to draw:

context.MoveTo (penVertices [0].X, penVertices [0].Y);

for (int i = 1; i < penVertices.Count; i++) {

context.AddLineToPoint (penVertices [i].X, penVertices [i].Y);

}
context.StrokePath();

And using below code to display the line

int num = penVertices.Count;

float minX = penVertices[num - 2].X < penVertices[num - 1].X ? penVertices[num - 2].X : penVertices[num - 1].X;

float minY = penVertices[num - 2].Y < penVertices[num - 1].Y ? penVertices[num - 2].Y : penVertices[num - 1].Y;

float maxX = penVertices[num - 2].X > penVertices[num - 1].X ? penVertices[num - 2].X : penVertices[num - 1].X;

float maxY = penVertices[num - 2].Y > penVertices[num - 1].Y ? penVertices[num - 2].Y : penVertices[num - 1].Y;

SetNeedsDisplayInRect(RectangleF.FromLTRB(minX - (ColorMessage.FontSize/2), minY - (ColorMessage.FontSize/2), maxX + (ColorMessage.FontSize/2), maxY + (ColorMessage.FontSize/2)));
Reply | Threaded
Open this post in threaded view
|

Re: Missing overlapped annotations

Nic Wise
Can you post code on how you are drawing?

On 9 April 2013 07:51, Naresh <[hidden email]> wrote:

> <http://monotouch.2284126.n4.nabble.com/file/n4658224/missing_annotations.png>
>
> Hi,
>   While I'm trying to draw cross lines on iPad view , Its erasing the
> overlapped part of previous line. I'm using setNeedsDisplayInRect() method
> to refresh drawings. please suggest me to overcome this issue.
>
>
>
>
> --
> View this message in context: http://monotouch.2284126.n4.nabble.com/Missing-overlapped-annotations-tp4658224.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch



--
Nic Wise
t.  +44 7788 592 806 | @fastchicken
b. http://www.fastchicken.co.nz/
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch