Archive

Archive for July, 2008

Mandalas

July 27th, 2008 Serabe 1 comment

Según la wikipedia, un mandala es:

“Mándala es un término de origen sánscrito, que significa diagramas o representaciones simbólicas bastante complejas, utilizadas tanto en el budismo como en el hinduismo.”

En un blog, he encontrado este tutorial de mandalas en YouTube:

0 Mandalas

Vía: ¿A que me parezco a Jodorowsky?

article clipper Mandalas
 
share save 171 16 Mandalas
Categories: GOTAM, Humor Tags: , , ,

RMagick: Dibujar con patrones

July 22nd, 2008 Serabe No comments

Una interesante cualidad de la clase Draw de RMagick es la posibilidad de definir patrones a través del método pattern.

En primer lugar, lo básico:

[ruby]
require ‘rubygems’
require ‘RMagick’

include Magick
[/ruby]

Ahora definamos el patrón. Para ello, necesitamos cinco parámetros, el nombre, dos números que recomiendo ponerlos a cero (después de unas cuantas pruebas, no he notado diferencias notables) y después las dimensiones del patrón.

[ruby]
draw = Draw.new

draw.pattern(‘circles’, 0, 0, 10, 10) do
draw.stroke ‘none’
draw.fill ‘red’
draw.rectangle 0, 0, 10, 10
draw.stroke ‘LightGreen’
draw.fill ‘blue’
draw.circle 5, 5, 5, 0
end
[/ruby]

Ya, por último, dibujamos un cuadrado y lo plasmamos en una imagen de 300×300.

[ruby]
draw.stroke ‘circles’
draw.stroke_width 25

draw.fill ‘none’

draw.polygon 150,0, 300,150, 150,300, 0,150

img = Image.new 300, 300

draw.draw img

img.write ‘pattern.jpg’
[/ruby]

Obteniéndose el siguiente resultado:

pattern RMagick: Dibujar con patrones

Dibujo con patrón como brocha

article clipper RMagick: Dibujar con patrones
 
share save 171 16 RMagick: Dibujar con patrones

New RMagick4J release.

July 9th, 2008 Serabe 1 comment

RMagick aims to implement the ImageMagick funcionality and the C portions of RMagick for make it works in JRuby.

Current stable version: 0.3.5
Project URL: http://code.google.com/p/rmagick4j/
Installation: gem install rmagick4j

Google Summer of Code project should be thanked for making this new release possible.

In release 0.3.5 the following improvements have been made:

  • Implemented Draw primitives (affice, arc, pattern, path).
  • Improved Image and ImageList:
  • Implemented more of Pixel (from_HSL, to_HSL, <=>, fcmp, intensity).
  • Implemented the fill classes.
  • Added a side-by-side (MRI vs JRuby) image testing tool named Bullseye.
  • Added 680 color names. It can search, but not retrieve the name correctly capitalized.
  • Changed gem name from RMagick4J to rmagick4j.

This version should allow Gruff Graphs and Ruports to largely work without issues. Please try out your applications with rmagick4j and help us provide feedback. It is our goal to make a fully-compatible implementation of RMagick4j in JRuby.

article clipper New RMagick4J release.
 
share save 171 16 New RMagick4J release.