Introduction to envelope objects

Source: Internet
Author: User

Envelope, also known as the envelope line, is a rectangular area and is the smallest external rectangle of each ry. Each geometry has an envelope, including the envelope itself.

It defines attributes such as xmax, xmin, Ymax, ymin, height, and width to obtain or set the space coordinates of an object with an envelope.

The ienvelope interface provides the following methods: expand (proportional scaling of the range of the envelope to generate a new envelope object), offset (moving the envelope through a given (x, y ), centerat (moving the envelope line by changing the center of the envelope line), putcoords (constructing the envelope line through the specified coordinate point), and so on.

Ienvelope also has two topology Calculation Methods: intersect (used to calculate the intersection of two envelope lines and return the part as the result) and Union (merge the envelope line, and use the smallest external rectangle of the two envelopes as the merged result ).

Ienvelope envelop1 = new envelopeclass ();
Ienvelope envelop2 = new envelopeclass ();
Envelop1.putcoords (100,100,200,200 );
Envelop2.putcoords (150,150,250,250 );
// Envelop1 becomes the intersection of two envelope
Envelop1.intersect (envelop2 );

 

Ienvelope envelop1 = new envelopeclass ();
Ienvelope envelop2 = new envelopeclass ();
Envelop1.putcoords (100,100,200,200 );
Envelop2.putcoords (150,150,250,250 );
// Combine two envelope into one
Envelop1.union (envelop2 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.