here is the code that I have in OnPaint
event of my form:
int elementCount;
String tStr = L"15:00";
::BeginPath(Canvas->Handle);
::TextOut(Canvas->Handle, 5, 5, tStr.c_str(), tStr.Length());
::EndPath(Canvas->Handle);
elementCount = ::GetPath(Canvas->Handle, NULL, NULL, 0);
Canvas->Brush->Color = clBlue;
Canvas->Pen->Color = clYellow;
Canvas->Pen->Width = 4;
if(0 < elementCount)
{
boost::scoped_array<TPoint> mPoints(new TPoint[elementCount]);
boost::scoped_array<BYTE> mTypes(new BYTE[elementCount]);
::GetPath(Canvas->Handle, mPoints.get(), mTypes.get(), elementCount);
::FillPath(Canvas->Handle);
::PolyDraw(Canvas->Handle, mPoints.get(), mTypes.get(), elementCount);
}
else
::StrokeAndFillPath(Canvas->Handle);
but here is what I get on the form:
as you can see the text comes out inverted (the text has to be blue and background gray but it is the other way around and the yellow line is around the background instead of text). Does anyone know how I can fix this?
I am using C++ Builder 10 Seattle but if anyone knows that Delphi or pure C++ trick, I can work with that as well.
Thank you