
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Canvas is a Compass plugin that provides a drawing surface similar to the <canvas>
element in JavaScript and Turtle graphics in other programming languages.
It uses Cairo as a back-end to perform all graphics operations.
Canvas supports anti-aliasing, vector graphics, gradients, masks, clipping, complex operations like drop shadow and many more.
Installation is done through RubyGems:
gem install compass-canvas
The compass-canvas
gem depends on the cairo
gem. In order to install both gems, you must have Cairo's development files present on your system.
You can usually install these using your OS package manager.
sudo apt-get install libcairo2-dev
@import 'canvas';
$shape: triangle(10, 10, 310, 10, 160, 190);
html {
background: canvas(320, 200,
$shape
brush(10, 10, 160, 100, rgba(red, 0.5) 50%, rgba(red, 0.75))
fill
reset
save
translate(40, 20)
scale(0.75, 0.75)
$shape
brush(black)
stroke
brush(10, 10, 160, 100, rgba(blue, 0.75) 50%, rgba(blue, 0.5))
fill
restore
) no-repeat 50% 50%;
}
Canvas is licensed under the MIT License.
RDoc is available for the entire project.
For more information on Cairo, visit The Cairo graphics tutorial.
For a complete reference on Cairo methods, visit Pycairo documentation.
compass-magick is a pure Ruby dynamic image generation for Compass using ChunkyPNG/PhantomJS (no dependency on RMagick despite the name). If you are looking for a project to generate image gradients or small & simple buttons, go check it out.
Copyright (c) 2011 Stan Angeloff. See LICENSE.md for details.
FAQs
Unknown package
We found that compass-canvas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.