The Littlest CPU Rasterizer
ginsweater.com
The Littlest CPU Rasterizer
1–10 of 18 posts
Re: The Littlest CPU Rasterizer
#2Re: The Littlest CPU Rasterizer
#3U32 ind = (xx-xStart + (yy-yStart) * 16+ ( zz-zStart ) * 16 * 16) * 2;
in your code, though ?
Re: The Littlest CPU Rasterizer
#4Re: The Littlest CPU Rasterizer
#5Re: The Littlest CPU Rasterizer
#6I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/
I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm...
i found the true-type format shape files and extracted polygons from those - which i also don't know how to rasterize.
i know this not really a response to the posted link - which is very low level and interesting - but maybe someone here knows an answer.
Re: The Littlest CPU Rasterizer
#7i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
Sort all polygon edges from top to bottom and walk through that list line-by-line, keeping track of all active edges for each scanline. For those you can then find all intersections and fill the ranges in-between. By using an even-odd rule you can make sure that concave polygons and polygons with holes are filled properly.
Re: The Littlest CPU Rasterizer
#8i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…
My take on the word cloud problem:
1. Sort words by frequency. Map the highest and lowest frequencies to some maximum and minimum font size.
2. Render each word into an individual image with FreeType.
3. Find some pleasing way to arrange the word images using only their bounding boxes.
4. Render the word images into a final image, picking a random pleasant color to tint each word as you go.
EDIT: Or did you mean, "how does font rendering work"? In that case, I think it mostly boils down to rasterizing line segments and Bezier curves, along with algorithms for kerning and for trying to fit the text to the pixel grid. FreeType's documentation goes into great detail about what exactly a modern text renderer has to deal with, yet I found it to be very accessible as someone with little prior knowledge of the field. I recommend giving it a look:Re: The Littlest CPU Rasterizer
#9i was trying to build a word cloud algorithm and then I had a question: how do you rasterize letter shapes? I looked at pyCairo but I couldn't figure out how to use it. http://cairographics.org/documentation/pycairo/3/ I asked on StackOverflow no answer http://stackoverflow.com/questions/21915335/getting-the-bitm... i found the true-type format shape files and extracted polygons from those - which i also don't know h…