The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Tiling in Pollock

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Tiling in Pollock Posted: Oct 2, 2006 12:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Tiling in Pollock
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

One of the oft overlooked (not used) things you can do when drawing in VisualWorks is to use a "Pattern" object. You can draw an arbitrary graphics using a Pixmap, and then send asPattern to it to get a Pattern, which can then be used polymorphically along with ColorValues and SymbolicPaints when setting the paint: of a GraphicsContext.

For me, one of the tricky parts of this technique comes when I need to the tile pattern to align, or be in phase, with some aspect of the view I'm drawing. You have to do all of this globalToLocal stuff. As I slide into Pollock, I was so happy to find how easy this is:

aGraphicsContext tilePhase: self frameBounds origin

That's it.

Read: Tiling in Pollock

Topic: An interview with Chip Dice Previous Topic   Next Topic Topic: Media Bloat

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use