private void DrawImageResizeArea(HwndRenderTarget renderTarget) { switch(renderMode) { case ImageRenderMode.ModeNomal: { if(targetImage != null) { //Rectangle rect = new Rectangle((int)resizeHotRect.Left, (int)resizeHotRect.Top, (int)resizeHotRect.Width, (int)resizeHotRect.Height); //Point newPoint = this.PointToClient(Cursor.Position); const int delta = 10; resizeHotRect = new RectF(renderRect.Width - delta, renderRect.Height - delta, renderRect.Width + delta, renderRect.Height + delta); renderTarget.DrawRectangle(resizeHotRect, renderTarget.CreateSolidColorBrush(new ColorF(Color.Red.ToArgb())), 1, d2dFactory.CreateStrokeStyle(new StrokeStyleProperties(CapStyle.Square, CapStyle.Square, CapStyle.Square, LineJoin.Miter, 1, DashStyle.Dash, 3))); if (lockResizeHotRectFlag) { renderTarget.FillRoundedRectangle(new RoundedRect(resizeHotRect,3,3), renderTarget.CreateSolidColorBrush(new ColorF(Color.Green.ToArgb()))); //renderTarget.DrawText(this.PointToClient(Cursor.Position).ToString(),, } } break; } } }