У меня есть стрелка с текстом, связанным с ней. Текст накладывается на стрелку в определенной точке. Я хочу, чтобы стрелка не видна в прямоугольнике, ограниченный по тексту я написал следующий кодПерекрывающая строка с текстовым полем
AdjustableArrowCap *cap1 = new AdjustableArrowCap(5, 5, true);
Pen *myPen1 = new Pen(Color::Color(0,255,255), width);
myPen->SetCustomEndCap(cap1);
GraphicsPath path;
path.AddLine(point1,point2);
Font font(&FontFamily(L"arial"), 21);
Brush *brush=new SolidBrush(Color::Color(0,255,255,255));
SolidBrush solidBrush(Color(255, 255, 0, 0));
StringFormat format;
format.SetAlignment(StringAlignmentCenter);
format.SetLineAlignment(StringAlignmentCenter);
RectF rectbo;
graph->MeasureString(strdata,wcslen(strdata),&font,PointF::PointF(point2),&rectbo);
graph->DrawLine(myPen,point2,point1);
Region pathRegion(&path);
sta=pathRegion.Intersect(rectbo);
graph->fillRegion(pathRegion,&brush);
graph->DrawString(strdata,wcslen(strdata),&font,point2,&format,brush1);
}
Я чувствую, как им пытается заполнить строку с цветом, который не возможно, так как я могу сделать невидимая линия.