MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / getClip

Method getClip

src/org/jibble/epsgraphics/EpsGraphics2D.java:965–977  ·  view source on GitHub ↗

Gets the current clipping area.

()

Source from the content-addressed store, hash-verified

963 * Gets the current clipping area.
964 */
965 @Override
966public Shape getClip() {
967 if(_clip==null) {
968 return null;
969 }
970 try {
971 AffineTransform t = _transform.createInverse();
972 t.concatenate(_clipTransform);
973 return t.createTransformedShape(_clip);
974 } catch(Exception e) {
975 throw new EpsException("Unable to get inverse of matrix: "+_transform); //$NON-NLS-1$
976 }
977 }
978
979 /**
980 * Sets the current clipping area to an arbitrary clip shape.

Callers 2

getClipBoundsMethod · 0.95
appendMethod · 0.95

Calls 2

createInverseMethod · 0.80
concatenateMethod · 0.45

Tested by

no test coverage detected