[cad-linux-dev] Re: image and viewport entities

  • From: Bruno Postle <bruno@xxxxxxxxxx>
  • To: CAD linux development <cad-linux-dev@xxxxxxxxxxxxx>
  • Date: Fri, 27 Aug 2004 14:56:44 +0100

On Fri 27-Aug-2004 at 08:04 -0500, Eric Wilhelm wrote:
> 
> Anyone have any thoughts on these?  I've been working with image 
> entities in dwg files for a couple years now, so I can attest that 
> the mixing of a local right-handed coordinate system with a global 
> left-handed system is an absolute pain.

My thoughts were that any png or jpg file in a drawing directory is
displayed at 0,0 with a scale of 72dpi (or whatever is in the file).

This means that in practice, each image will be in a directory of
its own, the directory will be used just as any other
block/reference (allowing positioning, scaling, rotation etc..).

So blocks, symbols, xrefs, images and viewports are all
manifestations of the same 'reference' entity.

A reference entity always points to a directory/drawing and
positions/scales/rotates it in coordinate-space.

- block: a reference to a drawing in a sub-directory
- symbol: same as a block
- xref: a reference to a drawing outside of the current directory
- image: a block containing an image file
- viewport: a reference to a drawing + a boundary

> If you want to clip to a circle, you just refer to the circle.

I think this is the right way to handle it.

-- 
Bruno

Other related posts: