123456789_123456789_123456789_123456789_123456789_

Class: Layout::ReferenceEntity

Relationships
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Entity
Instance Chain:
self, Entity
Inherits: Layout::Entity

Overview

An entity that represents the data inserted from an external file.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
reference_entity = doc.pages.first.entities.first
clip_mask = reference_entity.clip_mask
if clip_mask.is_a?(Layout::Rectangle)
  point1 = Geom::Point2d.new(1, 1)
  point2 = Geom::Point2d.new(2, 2)
  bounds = [point1, point2]
  reference_entity.clip_mask = Layout::Ellipse.new(bounds)
end

Version:

  • LayOut 2023.0

Instance Attribute Summary

Entity - Inherited

#locked=

The #locked= method sets the Entity as locked or unlocked.

#locked?

The #locked? method returns whether the Entity is locked or unlocked.

#on_shared_layer?

The #on_shared_layer? method returns whether or not the Entity is on a shared Layer.

#style

The #style method returns the Style of the Entity.

#style=

The #style= method sets the Style of the Entity.

#untransformed_bounds

The #untransformed_bounds method returns the untransformed bounds of the Entity.

#untransformed_bounds=

The #untransformed_bounds= method sets the untransformed bounds of the Entity.

Instance Method Summary

Entity - Inherited

#==

The #== method checks to see if the two Entitys are equal.

#bounds

The #bounds method returns the 2D rectangular bounds of the Entity.

#document

The #document method returns the Document that the Entity belongs to, or nil if it is not in a Document.

#drawing_bounds

The #drawing_bounds method returns the 2D rectangular drawing bounds of the Entity.

#group

The #group method returns the Group the Entity belongs to, or nil if it is not in a Group.

#layer_instance

The #layer_instance method returns the LayerInstance that the Entity is on, or nil if it is not associated with a LayerInstance.

#move_to_group

The #move_to_group method moves the Entity into a Group.

#move_to_layer

The #move_to_layer method moves the Entity to the given Layer.

#page

The #page method returns the Page that the Entity belongs to, or nil if it is on a shared Layer or not in a Document.

#transform!

The #transform! method transforms the Entity with a given ::Geom::Transformation2d.

#transformation

The #transformation method returns the explicit ::Geom::Transformation2d.

Instance Attribute Details

#clip_maskLayout::Entity (rw)

The #clip_mask method returns the clip mask of the ReferenceEntity, or nil if it does not have a clip mask.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
reference_entity = doc.pages.first.entities.first
clip_mask = image.clip_mask

Returns:

Version:

  • LayOut 2023.0

#clip_mask=(clip_mask) (rw)

The #clip_mask= method sets the clip mask of the ReferenceEntity. clip_mask can be a Rectangle, Ellipse, or Path, or nil, and it must not currently exist in a Document, or Group.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
reference_entity = doc.pages.first.entities.first
point1 = Geom::Point2d.new(1, 1)
point2 = Geom::Point2d.new(2, 2)
bounds = [point1, point2]
clip_mask = Layout::Rectangle.new(bounds)
reference_entity.clip_mask = clip_mask

Parameters:

Raises:

Version:

  • LayOut 2023.0

Instance Method Details

#entitiesLayout::Group

The #entities method returns the Group that represents the ReferenceEntity in its exploded form.

Examples:

doc = Layout::Document.open("C:/path/to/document.layout")
reference_entity = doc.pages.first.entities.first
entities = reference_entity.entities

Version:

  • LayOut 2023.0