Skip to content
Snippets Groups Projects
Commit 0deb2093 authored by Odilitime's avatar Odilitime
Browse files

fix starting X on wrap

parent 6d7c5475
No related branches found
No related tags found
No related merge requests found
......@@ -110,8 +110,9 @@ void TextComponent::rasterize(const int rawX, const int rawY) {
//glyphs = textRasterizer->rasterize(text, rawX, windowWidth, wrapToX, width, height, glyphCount, endingX, endingY, wrapped);
rasterizationRequest request;
request.text = text;
// startX needs to be relative to the parent x
request.startX = rawX - x;
// startX needs to be relative to the parent x. Why?
request.startX = rawX; // - x
//std::cout << "TextComponent::rasterize - [" << text << "] request.startX: " << request.startX << " x: " << x << " rawX: " << rawX << std::endl;
request.availableWidth = availableWidth;
request.sourceStartX = rasterStartX;
request.sourceStartY = rasterStartY;
......@@ -138,7 +139,7 @@ void TextComponent::rasterize(const int rawX, const int rawY) {
// if we didn't we have a nice little texture starting at rawX potentially up to windowWidth
// if we did wrap, then we start at wrapToX (0) and we're a big square texture
if (response->wrapped) {
//std::cout << "it's wrapped starting at " << wrapToX << std::endl;
//std::cout << "[" << text << "] it's wrapped starting at " << wrapToX << std::endl;
startX = wrapToX;
}
//std::cout << "startX: " << startX << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment