<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Graphics on ShrimpWorks</title><link>/tags/graphics/</link><description>Recent content in Graphics on ShrimpWorks</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 20 Mar 2016 00:00:00 +0000</lastBuildDate><atom:link href="/tags/graphics/feed.xml" rel="self" type="application/rss+xml"/><item><title>Image Halftone Processor</title><link>/2016/03/20/image-halftone-processor/</link><pubDate>Sun, 20 Mar 2016 00:00:00 +0000</pubDate><guid>/2016/03/20/image-halftone-processor/</guid><description>&lt;img src="/2016/03/20/image-halftone-processor/2016-03-17-halftone.png" class="image-center ful-width" /&gt;
 


&lt;p&gt;More a curiosity than an actual useful project, I just had an Idea I wanted to
try out, and this is the result.&lt;/p&gt;
&lt;p&gt;This Java application (or library, if you want to include it in your own
project) simply takes a source image, a couple of optional parameters, and
outputs a new image with a &lt;a href="https://en.wikipedia.org/wiki/Halftone"&gt;halftone&lt;/a&gt;-
like effect.&lt;/p&gt;
&lt;p&gt;Briefly, works by stepping through the pixels of the source image at an interval
defined by the dot size specified, samples the brightness of that pixel, and
draws a circle onto the destination image, scaled according to the source pixel
brightness.&lt;/p&gt;</description></item><item><title>Delphi: Write multi-line text on a TCanvas</title><link>/2006/05/24/delphi-write-multi-line-text-on-a-tcanvas/</link><pubDate>Wed, 24 May 2006 08:06:01 +0000</pubDate><guid>/2006/05/24/delphi-write-multi-line-text-on-a-tcanvas/</guid><description>&lt;p&gt;I&amp;rsquo;ve had to do quite a bit of stuff with images in Delphi recently (lots
of manual drawing too), and discovered TCanvas&amp;rsquo; TextOut method will only
draw text onto one line, line breaks and newlines are ignored. Google
search results suggested Windows&amp;rsquo; DrawText function, however despite all
the formatting and alignment flags it takes, it refused to draw text
centred vertically.&lt;/p&gt;
&lt;p&gt;Anyway, here&amp;rsquo;s a small-ish procedure which will take your multi-line
text, and draw it centred on the canvas you pass it. You also need to
pass the width and height of the canvas you&amp;rsquo;re drawing to. It assumes
the font can everything else has been set by you, prior to calling it.
Also, be sure &amp;ldquo;Graphics&amp;rdquo; is in your &amp;ldquo;uses&amp;rdquo; section.&lt;/p&gt;</description></item></channel></rss>