Sha256: 3dd7e9d989af3f275f6866c96bcea43124acabbca1e4f7f22959c4cc303303a0
Contents?: true
Size: 931 Bytes
Versions: 10
Compression:
Stored size: 931 Bytes
Contents
class PSD # Various helper methods that make accessing PSD data easier since it's # split up among various sections. module Helpers # Width of the entire PSD document, in pixels. def width header.cols end # Height of the entire PSD document, in pixels. def height header.rows end # All of the layers in this document, including section divider layers. def layers layer_mask.layers end # All of the layers, but filters out the section dividers. def actual_layers layers.delete_if { |l| l.folder? || l.folder_end? } end # All of the folders in the document. def folders layers.select { |l| l.folder? } end # Constructs a tree of the current document for easy traversal and data access. def tree @root ||= PSD::Node::Root.new(self) end def layer_comps @resources[:layer_comps].data.to_a end end end
Version data entries
10 entries across 10 versions & 1 rubygems