/ *   
 
   *   P R O J E C T :   N y A R T o o l k i t C S ( E x t e n s i o n ) 
 
   *   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   *   T h e   N y A R T o o l k i t C S   i s   C #   e d i t i o n   A R T o o l K i t   c l a s s   l i b r a r y . 
 
   *   C o p y r i g h t   ( C ) 2 0 0 8 - 2 0 0 9   R y o   I i z u k a 
 
   * 
 
   *   T h i s   p r o g r a m   i s   f r e e   s o f t w a r e :   y o u   c a n   r e d i s t r i b u t e   i t   a n d / o r   m o d i f y 
 
   *   i t   u n d e r   t h e   t e r m s   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   a s   p u b l i s h e d   b y 
 
   *   t h e   F r e e   S o f t w a r e   F o u n d a t i o n ,   e i t h e r   v e r s i o n   3   o f   t h e   L i c e n s e ,   o r 
 
   *   ( a t   y o u r   o p t i o n )   a n y   l a t e r   v e r s i o n . 
 
   *   
 
   *   T h i s   p r o g r a m   i s   d i s t r i b u t e d   i n   t h e   h o p e   t h a t   i t   w i l l   b e   u s e f u l , 
 
   *   b u t   W I T H O U T   A N Y   W A R R A N T Y ;   w i t h o u t   e v e n   t h e   i m p l i e d   w a r r a n t y   o f 
 
   *   M E R C H A N T A B I L I T Y   o r   F I T N E S S   F O R   A   P A R T I C U L A R   P U R P O S E .     S e e   t h e 
 
   *   G N U   G e n e r a l   P u b l i c   L i c e n s e   f o r   m o r e   d e t a i l s . 
 
   * 
 
   *   Y o u   s h o u l d   h a v e   r e c e i v e d   a   c o p y   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e 
 
   *   a l o n g   w i t h   t h i s   p r o g r a m .     I f   n o t ,   s e e   < h t t p : / / w w w . g n u . o r g / l i c e n s e s / > . 
 
   *   
 
   *   F o r   f u r t h e r   i n f o r m a t i o n   p l e a s e   c o n t a c t . 
 
   * 	 h t t p : / / n y a t l a . j p / n y a t o o l k i t / 
 
   * 	 < a i r m a i l ( a t ) e b o n y . p l a l a . o r . j p >   o r   < n y a t l a ( a t ) n y a t l a . j p > 
 
   *   
 
   * / 
 
 u s i n g   S y s t e m ; 
 
 u s i n g   S y s t e m . D i a g n o s t i c s ; 
 
 u s i n g   j p . n y a t l a . n y a r t o o l k i t . c s . c o r e ; 
 
 
 
 n a m e s p a c e   j p . n y a t l a . n y a r t o o l k i t . c s . r p f 
 
 
 
 { 
 
 
 
         / * * 
 
           *   0000000000k0[Y000yrkj0;u }0000Kbk0cOW0~0Y00
 
           * 
 
           * / 
 
         p u b l i c   i n t e r f a c e   I N y A R V e c t o r R e a d e r 
 
         { 
 
 	         / * * 
 
 	           *   R E C T {VQn0;u }0000n0T$Ph000000n0000-N_0S_W0~0Y00  3 2 0 * 2 4 0 n04XT0
 
 	           *   R E C T n0{Vo0( x > = 0   & &   x < 3 1 9   x + w > = 0   & &   x + w < 3 1 9 ) , ( y > = 0   & &   y < 2 3 9   x + w > = 0   & &   x + w < 3 1 9 ) h0j00~0Y00
 
 	           *   @ p a r a m   i x 
 
 	           *   0000S_0LF0MOn0-[W0~0Y00
 
 	           *   @ p a r a m   i y 
 
 	           *   0000S_0LF0MOn0-[W0~0Y00
 
 	           *   @ p a r a m   i w 
 
 	           *   0000S_0LF0{V0-[W0~0Y00
 
 	           *   @ p a r a m   i h 
 
 	           *   0000S_0LF0{V0-[W0~0Y00
 
 	           *   @ p a r a m   o _ p o s v e c 
 
 	           *   000-N_h000000ԏW0~0Y00
 
 	           *   @ r e t u r n 
 
 	           *   0000n07_^0ԏW0~0Y007_^$Po00]R$Pn0NWNn0Tg0Y00
 
 	           * / 
 
 	         i n t   g e t A r e a V e c t o r 3 3 ( i n t   i x ,   i n t   i y ,   i n t   i w ,   i n t   i h , N y A R V e c L i n e a r 2 d   o _ p o s v e c ) ; 
 
 	         i n t   g e t A r e a V e c t o r 2 2 ( i n t   i x ,   i n t   i y ,   i n t   i w ,   i n t   i h , N y A R V e c L i n e a r 2 d   o _ p o s v e c ) ; 
 
 
 
                 b o o l   t r a c e C o n t u r e ( i n t   i _ t h , 
 
 	 	 	         N y A R I n t P o i n t 2 d   i _ e n t r y ,   V e c L i n e a r C o o r d i n a t e s   o _ c o o r d ) ; 
 
 
 
 	         / * * 
 
 	           *   p1 h0p2 n0k0}R0[W0f00]0n0}R
Nn000000_~0Y00po00;uPn0QtPg0j0Q00p0j00~0[000  3 2 0 * 2 4 0 n04XT0( x > = 0   & & 
 
 	           *   x < 3 2 0   x + w > 0   & &   x + w < 3 2 0 ) , ( y > 0   & &   y < 2 4 0   y + h > = 0   & &   y + h < = 3 1 9 ) h0j00~0Y00
 
 	           *   
 
 	           *   @ p a r a m   i _ p o s 1 
 
 	           *                         p1 n0^jg0Y00
 
 	           *   @ p a r a m   i _ p o s 2 
 
 	           *                         p2 n0^jg0Y00
 
 	           *   @ p a r a m   i _ a r e a 
 
 	           *                         00000iQY000000000g0Y001 n04XT( n * 2 - 1 ) ^ 2 n00000k0j00~0Y00  p2 n0^jg0Y00
 
 	           *   @ p a r a m   o _ c o o r d 
 
 	           *                         P}g0SQ0S0000000g0Y00
 
 	           *   @ r e t u r n 
 
 	           *   @ t h r o w s   N y A R E x c e p t i o n 
 
 	           * / 
 
                 b o o l   t r a c e L i n e ( N y A R I n t P o i n t 2 d   i _ p o s 1 ,   N y A R I n t P o i n t 2 d   i _ p o s 2 ,   i n t   i _ e d g e ,   V e c L i n e a r C o o r d i n a t e s   o _ c o o r d ) ; 
 
 
 
                 b o o l   t r a c e L i n e ( N y A R D o u b l e P o i n t 2 d   i _ p o s 1 ,   N y A R D o u b l e P o i n t 2 d   i _ p o s 2 ,   i n t   i _ e d g e ,   V e c L i n e a r C o o r d i n a t e s   o _ c o o r d ) ; 
 
 
 
 	         / * * 
 
 	           *   *}0S_W0~0Y00
 
 	           *   S_000000o00NNn00g0Y00
 
 	           *   1 . *퐧^j( n ) n0;u }hTn0;u }00000S_0
 
 	           *   2 . *퐧^j( n + 1 ) hTn0;u }0000h0k0
 
 	           *   3 . ]RL0 N[NNj000^jh07_^0OX[
 
 	           *   4 . 3 pN
Nn0ƖTk0j0c0_000 g\NWNlg0v}0{0
 
 	           *   5 . v}n0R͑$P0P0n0;u }0000n0Th0W0f0ԏtS0
 
 	           * / 
 
                 b o o l   t r a c e C o n t u r e ( N y A R I n t C o o r d i n a t e s   i _ c o o r d ,   i n t   i _ p o s _ m a g ,   i n t   i _ c e l l _ s i z e ,   V e c L i n e a r C o o r d i n a t e s   o _ c o o r d ) ; 
 
 	         / * * 
 
 	           *   000000NM0n00000000g0Y00
 
 	           *   
 
 	           *   @ p a r a m   i _ p o s 1 
 
 	           *   @ p a r a m   i _ p o s 2 
 
 	           *   @ p a r a m   i _ e d g e 
 
 	           *   @ p a r a m   o _ c o o r d 
 
 	           *   @ r e t u r n 
 
 	           *   @ t h r o w s   N y A R E x c e p t i o n 
 
 	           * / 
 
                 b o o l   t r a c e L i n e W i t h C l i p ( N y A R D o u b l e P o i n t 2 d   i _ p o s 1 , 
 
 	 	         N y A R D o u b l e P o i n t 2 d   i _ p o s 2 ,   i n t   i _ e d g e ,   V e c L i n e a r C o o r d i n a t e s   o _ c o o r d ) ; 
 
         } 
 
 } 