Edit box baseline (regresses volume control dialog though)

This commit is contained in:
elasota
2020-02-03 04:54:55 -05:00
parent 25ee3531b2
commit dee560492e
9 changed files with 126 additions and 8 deletions

View File

@@ -309,8 +309,8 @@ static void DrawGlyph(PortabilityLayer::QDState *qdState, PixMap *pixMap, const
if (clampedLeftCoord >= clampedRightCoord || clampedTopCoord >= clampedBottomCoord)
return;
const uint32_t firstOutputRow = clampedTopCoord - rect.top;
const uint32_t firstOutputCol = clampedLeftCoord - rect.left;
const uint32_t firstOutputRow = clampedTopCoord;
const uint32_t firstOutputCol = clampedLeftCoord;
const uint32_t firstInputRow = clampedTopCoord - topCoord;
const uint32_t firstInputCol = clampedLeftCoord - leftCoord;
@@ -394,6 +394,11 @@ static void DrawGlyph(PortabilityLayer::QDState *qdState, PixMap *pixMap, const
}
void DrawSurface::DrawString(const Point &point, const PLPasStr &str, bool aa)
{
DrawStringConstrained(point, str, aa, Rect::CreateLargest());
}
void DrawSurface::DrawStringConstrained(const Point &point, const PLPasStr &str, bool aa, const Rect &constraintRect)
{
PortabilityLayer::QDPort *port = &m_port;
@@ -413,10 +418,10 @@ void DrawSurface::DrawString(const Point &point, const PLPasStr &str, bool aa)
PixMap *pixMap = *port->GetPixMap();
const Rect rect = pixMap->m_rect;
const Rect rect = pixMap->m_rect.Intersect(constraintRect);
if (!rect.IsValid())
return; // ???
return;
Point paraStartPos = penPos;