<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4349911995767920194.post5020126062180503223..comments</id><updated>2011-08-09T10:10:50.547-05:00</updated><category term='Vista'/><category term='Declares'/><category term='User Interface'/><category term='Plugins'/><category term='Windows Marketplace'/><category term='Microsoft'/><category term='Cairo'/><category term='Technology'/><category term='Xcode'/><category term='10.7'/><category term='bugs'/><category term='Structure'/><category term='Stack Trace'/><category term='Windows'/><category term='SQLite'/><category term='REAL Studio Web Edition'/><category term='Oracle'/><category term='Flicker'/><category term='Feedback'/><category term='Apple'/><category term='general'/><category term='IDE'/><category term='REAL Server'/><category term='WebPageSource'/><category term='validation'/><category term='Skype'/><category term='Programming'/><category term='REALbasic'/><category term='Web'/><category term='LLVM'/><category term='Steve Jobs'/><category term='New Releases'/><category term='REAL Studio'/><category term='Declare'/><category term='Community'/><category term='Debugger'/><category term='Conference'/><category term='Mac'/><category term='Mac OS X'/><category term='REALSQLDatabase'/><category term='Tablets'/><category term='feature requests'/><category term='Documentation'/><category term='iOS'/><category term='Events'/><category term='JSON'/><category term='Android'/><category term='Alignment'/><category term='iPod Touch'/><category term='Web 3.0'/><category term='Mac OSX'/><category term='HTML5'/><category term='64 bit'/><category term='announcements'/><category term='Windows 7'/><category term='PowerPC'/><category term='Mac App Store'/><category term='Mobile'/><category term='Renewal'/><category term='Lion'/><category term='MySQL'/><category term='Internet'/><category term='Javascript'/><category term='iCloud'/><category term='WebPopupMenu'/><category term='graphics'/><category term='REALSQLDatabsae'/><category term='Buttons'/><category term='Leicester'/><category term='Tips'/><category term='Platforms'/><category term='OSX'/><category term='8 digit code'/><category term='Developer Costs'/><category term='UK'/><category term='Canvas'/><category term='Carbon'/><category term='Apple iMac TV'/><category term='Firefox'/><category term='Cross-Platform'/><category term='iPhone'/><category term='REALbasic applications'/><category term='REAL World'/><category term='Upgrade'/><category term='Tip'/><category term='Database'/><category term='Linux'/><category term='optimization'/><category term='Porting'/><category term='Cocoa'/><category term='compiling'/><category term='Smartphones'/><category term='iPad'/><category term='Exceptions'/><category term='Intel'/><category term='Education'/><title type='text'>Comments on Real Software: Drawing multiple color gradients</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.realsoftwareblog.com/feeds/5020126062180503223/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html'/><author><name>Thom McGrath</name><uri>http://www.blogger.com/profile/05135025818950044797</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_-oZ3Nd9coj0/Sa2axP5y4tI/AAAAAAAAAAM/IiZERDhd3dE/S220/photo.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-5633636982574599027</id><published>2009-08-28T03:26:23.651-05:00</published><updated>2009-08-28T03:26:23.651-05:00</updated><title type='text'>I&amp;#39;ve decided to take part of the challenge. He...</title><content type='html'>I&amp;#39;ve decided to take part of the challenge. Here&amp;#39;s the code to create radial gradients:&lt;br /&gt;&lt;br /&gt;Function CreateRadialGradient(Width As Integer, Height As Integer, Points() As Pair) As Picture&lt;br /&gt;  // Change this constant to modify the quality. The higher the number, the more&lt;br /&gt;  // passes will be made to refine the gradient, at the cost of rendering speed.&lt;br /&gt;  const quality = 50&lt;br /&gt;  &lt;br /&gt;  dim p as new picture(width,height,32)&lt;br /&gt;  dim i,x,y,v,w,h,s,e as integer&lt;br /&gt;  dim pointOne,pointTwo as pair&lt;br /&gt;  dim colorOne,colorTwo,blendedColor as color&lt;br /&gt;  dim pct,amt as double&lt;br /&gt;  dim curLeft,curTop,curWidth,curHeight,destLeft,destTop,destWidth,destHeight as integer&lt;br /&gt;  &lt;br /&gt;  p.graphics.forecolor = points(0).right.colorvalue&lt;br /&gt;  p.graphics.fillrect(0,0,p.width,p.height)&lt;br /&gt;  &lt;br /&gt;  for i = 0 to ubound(points) - 1&lt;br /&gt;    pointone = points(i)&lt;br /&gt;    pointtwo = points(i + 1)&lt;br /&gt;    colorone = pointone.right&lt;br /&gt;    colortwo = pointtwo.right&lt;br /&gt;    &lt;br /&gt;    destwidth = ((1 - pointtwo.left.doublevalue) * width)&lt;br /&gt;    destheight = ((1 - pointtwo.left.doublevalue) * height)&lt;br /&gt;    destleft = curleft + (destwidth / 2)&lt;br /&gt;    desttop = curtop + (destheight / 2)&lt;br /&gt;    curwidth = (1 - pointone.left.doublevalue) * width&lt;br /&gt;    curheight = (1 - pointone.left.doublevalue) * height&lt;br /&gt;    &lt;br /&gt;    s = pointone.left.doublevalue * quality&lt;br /&gt;    e = pointtwo.left.doublevalue * quality&lt;br /&gt;    for v = s to e&lt;br /&gt;      amt = v / quality&lt;br /&gt;      x = amt * (width / 2)&lt;br /&gt;      y = amt * (height / 2)&lt;br /&gt;      w = width * (1 - (v / quality))&lt;br /&gt;      h = height * (1 - (v / quality))&lt;br /&gt;      pct = (v - s) / (e - s)&lt;br /&gt;      blendedcolor = rgb((colorone.red * (1 - pct)) + (colortwo.red * pct),(colorone.green * (1 - pct)) + (colortwo.green * pct),(colorone.blue * (1 - pct)) + (colortwo.blue * pct))&lt;br /&gt;      p.graphics.forecolor = blendedcolor&lt;br /&gt;      p.graphics.filloval(x,y,w,h)&lt;br /&gt;    next&lt;br /&gt;    &lt;br /&gt;    curleft = curleft + destleft&lt;br /&gt;    curtop = curtop + desttop&lt;br /&gt;  next&lt;br /&gt;  &lt;br /&gt;  return p&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Not sure how well that code will appear in the comments though.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/5633636982574599027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/5633636982574599027'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1251447983651#c5633636982574599027' title=''/><author><name>Thom McGrath</name><uri>http://www.blogger.com/profile/05135025818950044797</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_-oZ3Nd9coj0/Sa2axP5y4tI/AAAAAAAAAAM/IiZERDhd3dE/S220/photo.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1643226227'/></entry><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-1767958372801253394</id><published>2009-08-27T11:25:56.357-05:00</published><updated>2009-08-27T11:25:56.357-05:00</updated><title type='text'>Ahhhh but your missing the point of a screenshot r...</title><content type='html'>Ahhhh but your missing the point of a screenshot request -- it&amp;#39;s for users who DO NOT HAVE REALbasic installed.  &lt;br /&gt;For example, I&amp;#39;m posting this from a BlackBerry.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/1767958372801253394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/1767958372801253394'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1251390356357#c1767958372801253394' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-960278911'/></entry><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-3757926934216181206</id><published>2009-08-26T02:47:44.760-05:00</published><updated>2009-08-26T02:47:44.760-05:00</updated><title type='text'>@Anonymous: It took me four minutes to paste Thom&amp;...</title><content type='html'>@Anonymous: It took me four minutes to paste Thom&amp;#39;s code into a project and test it.&lt;br /&gt;I&amp;#39;ve put a very amateurish screenshot at&lt;br /&gt;http://rbjottings.co.uk/picstuff/gradient.png</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/3757926934216181206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/3757926934216181206'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1251272864760#c3757926934216181206' title=''/><author><name>Steve Garman</name><uri>http://www.blogger.com/profile/09822355651627552034</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14627581906401228419'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-453927388'/></entry><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-3097492478643839708</id><published>2009-08-25T23:27:28.493-05:00</published><updated>2009-08-25T23:27:28.493-05:00</updated><title type='text'>How about providing a couple of screenshots of the...</title><content type='html'>How about providing a couple of screenshots of the effect.  Nothing large; doesn&amp;#39;t even need to be the entire window -- just a snapshot of what the code does.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/3097492478643839708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/3097492478643839708'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1251260848493#c3097492478643839708' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-977924096'/></entry><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-1144797664798059973</id><published>2009-08-23T13:29:33.852-05:00</published><updated>2009-08-23T13:29:33.852-05:00</updated><title type='text'>Angled gradients are probably the more difficult. ...</title><content type='html'>Angled gradients are probably the more difficult. You basically need to recall some high school math and draw lines. Radials are simple, draw circles.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/1144797664798059973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/1144797664798059973'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1251052173852#c1144797664798059973' title=''/><author><name>Thom McGrath</name><uri>http://www.blogger.com/profile/05135025818950044797</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_-oZ3Nd9coj0/Sa2axP5y4tI/AAAAAAAAAAM/IiZERDhd3dE/S220/photo.png'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1643226227'/></entry><entry><id>tag:blogger.com,1999:blog-4349911995767920194.post-638506746198943878</id><published>2009-08-22T18:52:37.255-05:00</published><updated>2009-08-22T18:52:37.255-05:00</updated><title type='text'>That sounds really good but what if you needed to ...</title><content type='html'>That sounds really good but what if you needed to draw the gradient at an angle? Or even harder - radial gradients. How might one tackle that?&lt;br /&gt;&lt;br /&gt;Thanks much.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/638506746198943878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4349911995767920194/5020126062180503223/comments/default/638506746198943878'/><link rel='alternate' type='text/html' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html?showComment=1250985157255#c638506746198943878' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.realsoftwareblog.com/2009/08/drawing-multiple-color-gradients.html' ref='tag:blogger.com,1999:blog-4349911995767920194.post-5020126062180503223' source='http://www.blogger.com/feeds/4349911995767920194/posts/default/5020126062180503223' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-254246176'/></entry></feed>
