예제 #1
0
 /** [Internal] */
 public void paintComponent(Graphics g) {
   boolean opq = true;
   if (theOpaque != null) opq = theOpaque;
   super.setOpaque(opq);
   // if(theBackground!=null)super.setBackground(theBackground);
   super.paintComponent(g);
   Graphics2D g2 = (Graphics2D) g;
   Rectangle rt = getBounds();
   rt.x = 0;
   rt.y = 0;
   doBuffer(g2, opq, rt);
   chkFPS();
 }
예제 #2
0
 /**
  * Finds the Interactive located at the specified pixel position.
  *
  * @param panel the drawing panel
  * @param xpix the x pixel position
  * @param ypix the y pixel position
  * @return the TPoint that is hit, or null
  */
 public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix) {
   boolean highlighted = (track.trackerPanel.getFrameNumber() == getFrameNumber());
   AutoTracker autoTracker = track.trackerPanel.getAutoTracker();
   TrackerPanel trackerPanel = (TrackerPanel) panel;
   setHitRectCenter(xpix, ypix);
   for (int i = 0; i < points.length; i++) {
     if (points[i] == null || Double.isNaN(points[i].getX())) continue;
     if (hitRect.contains(points[i].getScreenPosition(trackerPanel))) {
       if (highlighted && autoTracker.isDrawingKeyFrameFor(track, i)) return null;
       return points[i];
     }
   }
   return null;
 }
예제 #3
0
 /**
  * Centers the hit testing rectangle on the specified screen point.
  *
  * @param xpix the x pixel position
  * @param ypix the y pixel position
  */
 protected void setHitRectCenter(int xpix, int ypix) {
   hitRect.setLocation(xpix - hitRect.width / 2, ypix - hitRect.height / 2);
 }
예제 #4
0
 // Graphics2D g=getG();return g==null?null:g.getClipBounds();}
 public Rectangle getClipBounds(Rectangle r) {
   Shape s = bufferClip();
   if (s == null) return null;
   r.setBounds(bufferClip().getBounds());
   return r;
 }
예제 #5
0
 /**
  * This returns the full current drawing area
  *
  * @return full drawing area
  */
 public Rectangle getClipBounds(Rectangle r) {
   r.setBounds(0, 0, m_extent.width, m_extent.height);
   return r;
 }