Logo Search packages:      
Sourcecode: wims version File versions  Download package

int edu::hws::jcm::draw::CoordinateRect::yToPixel ( double  y  )  [inline]

Convert a y-coodinate into a vertical pixel coordinate. (This is only valid when the CoordinateRect has actually been displayed. It is meant mainly to be used by Drawables in this CoordinateRect.)

Definition at line 418 of file CoordinateRect.java.

Referenced by edu::hws::jcm::functions::TableFunctionGraph::draw(), edu::hws::jcm::draw::ScatterPlot::draw(), edu::hws::jcm::draw::RiemannSumRects::draw(), edu::hws::jcm::draw::Grid::draw(), edu::hws::jcm::draw::DrawString::draw(), edu::hws::jcm::draw::DataPlot::draw(), edu::hws::jcm::functions::TableFunctionInput::mousePressed(), and edu::hws::jcm::functions::TableFunctionGraph::mousePressed().

      int yInt =  top + gap + (int)((ymax - y)/(ymax - ymin) * (height-2*gap-1));   
      if (yInt < -32000)
         return -32000;
      else if (yInt > 32000)
         return 32000;
         return yInt;

Generated by  Doxygen 1.6.0   Back to index