class Gdsii::Box
Represents a GDSII box element. Most methods are from Element or from the various included Access module methods.
Public Class Methods
new(layer=nil, boxtype=nil, xy=nil) { |self| ... }
click to toggle source
Create a box record grouping given a layer, boxtype, and xy coordinates. The box object is to have exactly 5 coordinate pairs.
box = Gdsii::Box.new(1, 0, [0,0, 0,10, 10,10, 10,0, 0,0])
Calls superclass method
# File lib/gdsii/box.rb, line 40 def initialize(layer=nil, boxtype=nil, xy=nil) super() @records[GRT_BOX] = Record.new(GRT_BOX) self.layer = layer unless layer.nil? self.boxtype = boxtype unless boxtype.nil? self.xy = xy unless xy.nil? yield self if block_given? end
Public Instance Methods
boxtype()
click to toggle source
Get the boxtype number (returns Fixnum).
# File lib/gdsii/box.rb, line 57 def boxtype() @records.get_data(GRT_BOXTYPE); end
boxtype=(val)
click to toggle source
Set the boxtype number.
# File lib/gdsii/box.rb, line 62 def boxtype=(val) @records.set(GRT_BOXTYPE, val); end
boxtype_record()
click to toggle source
Get the boxtype record (returns Record).
# File lib/gdsii/box.rb, line 52 def boxtype_record() @records.get(GRT_BOXTYPE); end