Piccolo.NET

PLens Class

PLens is a simple default lens implementation for Piccolo.

For a list of all members of this type, see PLens Members.

System.Object
   PNode
      PLens

public class PLens : PNode

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Lenses are often application specific. It may be easiest to study this code, and then implement a custom lens using the general principles illustrated here. See UMD.HCIL.PiccoloExample.LensExample for one possible use of this lens.

The basic design here is to add a PCamera as the child of a PNode (the lens node). The camera is the viewing part of the lens, and the node is the title bar that can be used to move the lens around. Users of this lens will probably want to set up a lens specific event handler and attach it to the camera.

A lens also needs a layer that it will look at (it should not be the same as the layer that it’s added to because then it will draw itself in a recursive loop). Last of all, PLens will need to be added to the PCanvas layer (so that it can be seen by the main camera).

Requirements

Namespace: UMD.HCIL.PiccoloX.Nodes

Assembly: UMD.HCIL.PiccoloX (in UMD.HCIL.PiccoloX.dll)

See Also

PLens Members | UMD.HCIL.PiccoloX.Nodes Namespace