コード例 #1
0
		public int step_ver_base(distance_interpolator1 di)
		{
			m_li.Next();
			m_y += m_lp.inc;
			m_x = (m_lp.x1 + m_li.y()) >> LineAABasics.line_subpixel_shift;

			if (m_lp.inc > 0) di.inc_y(m_x - m_old_x);
			else di.dec_y(m_x - m_old_x);

			m_old_x = m_x;

			return di.dist() / m_len;
		}
コード例 #2
0
		//typedef Renderer renderer_type;
		//typedef line_interpolator_aa_base<Renderer> base_type;

		//---------------------------------------------------------------------
		public line_interpolator_aa0(OutlineRenderer ren, line_parameters lp)
			: base(ren, lp)
		{
			m_di = new distance_interpolator1(lp.x1, lp.y1, lp.x2, lp.y2,
				 lp.x1 & ~LineAABasics.line_subpixel_mask, lp.y1 & ~LineAABasics.line_subpixel_mask);

			m_li.adjust_forward();
		}
コード例 #3
0
		public int step_hor_base(distance_interpolator1 di)
		{
			m_li.Next();
			m_x += m_lp.inc;
			m_y = (m_lp.y1 + m_li.y()) >> LineAABasics.line_subpixel_shift;

			if (m_lp.inc > 0) di.inc_x(m_y - m_old_y);
			else di.dec_x(m_y - m_old_y);

			m_old_y = m_y;

			return di.dist() / m_len;
		}