class Gdsii::Boundary

Represents a GDSII Boundary element (i.e. a rectangle or polygon). Most methods are from Element or from the various included Access module methods.

Public Class Methods

new(layer=nil, datatype=nil, xy=nil) { |self| ... } click to toggle source

Boundary object constructor. Layer and datatype are given as Fixnum and the coordinate points are given as an array of Fixnum alternating x and y values (coordinate pair range is 4-200). Example:

rectangle = Gdsii::Boundary.new(1, 0, [0,0, 0,10, 10,10, 10,0, 0,0])
Calls superclass method
# File lib/gdsii/boundary.rb, line 43
def initialize(layer=nil, datatype=nil, xy=nil)
  super()
  @records[GRT_BOUNDARY] = Record.new(GRT_BOUNDARY)
  self.layer = layer unless layer.nil?
  self.datatype = datatype unless datatype.nil?
  self.xy = xy unless xy.nil?
  yield self if block_given?
end