Loading common/gr_basic.cpp +29 −20 Original line number Original line Diff line number Diff line Loading @@ -82,8 +82,8 @@ static void GRSFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle int EndAngle, int r, int width, int Color, int BgColor ); int EndAngle, int r, int width, int Color, int BgColor ); static void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, static void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int aPenSize, int Color ); int width, int aPenSize, int Color ); static void GRSFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, static void GRSLineArray( EDA_Rect* ClipBox, wxDC* DC, wxPoint points[], int width, int Color ); int lines, int width, int Color ); /**/ /**/ extern BASE_SCREEN* ActiveScreen; extern BASE_SCREEN* ActiveScreen; Loading Loading @@ -990,6 +990,13 @@ void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, GRMapY( y2 ), ZoomValue( width ), 0, Color ); GRMapY( y2 ), ZoomValue( width ), 0, Color ); } } void GRCSegm( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor ) { GRSCSegm( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), ZoomValue( aWidth ), 0, aColor ); } /* /* * Draw segment (full) with rounded ends in object space (real coords.). * Draw segment (full) with rounded ends in object space (real coords.). Loading @@ -997,24 +1004,17 @@ void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color ) int width, int Color ) { { GRSFillCSegm( ClipBox, DC, GRMapX( x1 ), GRMapY( y1 ), GRMapX( x2 ), WinClipAndDrawLine( ClipBox, DC, GRMapX( x1 ), GRMapY( y1 ), GRMapX( x2 ), GRMapY( y2 ), ZoomValue( width ), Color ); GRMapY( y2 ), Color, ZoomValue( width ) ); } } /* void GRFilledSegment( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, * Draw segment with rounded ends in screen space. int aWidth, int aColor ) */ void GRSFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color ) { { WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, Color, width ); WinClipAndDrawLine( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), aColor, ZoomValue( aWidth ) ); } } Loading Loading @@ -1498,6 +1498,15 @@ void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, Color ); Color ); } } void GRArc1( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, wxPoint aCenter, int aWidth, int aColor ) { GRSArc1( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), GRMapX( aCenter.x ), GRMapY( aCenter.y ), ZoomValue( aWidth ), aColor ); } /* /* * Draw an arc, width = width, in screen space. * Draw an arc, width = width, in screen space. Loading gerbview/block.cpp +3 −20 Original line number Original line Diff line number Diff line Loading @@ -45,9 +45,6 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, wxDC* DC, bool erase ); bool erase ); static bool IsGbrItemInBox( BLOCK_SELECTOR& aBlocklocate, GERBER_DRAW_ITEM* aItem ); /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to * the key (ALT, SHIFT ALT ..) * the key (ALT, SHIFT ALT ..) */ */ Loading Loading @@ -292,7 +289,7 @@ void WinEDA_GerberFrame::Block_Delete( wxDC* DC ) { { nextitem = item->Next(); nextitem = item->Next(); GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) gerb_item->DeleteStructure(); gerb_item->DeleteStructure(); } } Loading Loading @@ -324,7 +321,7 @@ void WinEDA_GerberFrame::Block_Move( wxDC* DC ) for( ; item; item = item->Next() ) for( ; item; item = item->Next() ) { { GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) gerb_item->Move( delta ); gerb_item->Move( delta ); } } Loading Loading @@ -355,7 +352,7 @@ void WinEDA_GerberFrame::Block_Duplicate( wxDC* DC ) for( ; item; item = item->Next() ) for( ; item; item = item->Next() ) { { GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) { { /* this item must be duplicated */ /* this item must be duplicated */ BOARD_ITEM* new_item = gerb_item->Copy(); BOARD_ITEM* new_item = gerb_item->Copy(); Loading @@ -367,17 +364,3 @@ void WinEDA_GerberFrame::Block_Duplicate( wxDC* DC ) DrawPanel->Refresh(); DrawPanel->Refresh(); } } /* Test if the structure PtStruct is inside the block * Returns true or false */ bool IsGbrItemInBox( BLOCK_SELECTOR& aBlocklocate, GERBER_DRAW_ITEM* aItem ) { if( aBlocklocate.Inside( aItem->m_Start ) ) return true; if( aBlocklocate.Inside( aItem->m_End ) ) return true; return false; } gerbview/class_GERBER.cpp +8 −6 Original line number Original line Diff line number Diff line Loading @@ -123,21 +123,23 @@ void GERBER::ResetDefaultValues() m_LayerName = wxT( "no layer name" ); // Layer name from the LN command m_LayerName = wxT( "no layer name" ); // Layer name from the LN command m_LayerNegative = false; // true = Negative Layer m_LayerNegative = false; // true = Negative Layer m_ImageNegative = false; // true = Negative image m_ImageNegative = false; // true = Negative image m_GerbMetric = false; // false = Inches, true = metric m_GerbMetric = false; // false = Inches (default), true = metric m_Relative = false; // false = absolute Coord, m_Relative = false; // false = absolute Coord, // true = relative Coord // true = relative Coord m_NoTrailingZeros = false; // true: trailing zeros deleted m_NoTrailingZeros = false; // true: trailing zeros deleted m_MirorA = false; // true: miror / axe A (default = X) m_MirrorA = false; // true: miror / axe A (default = X) m_MirorB = false; // true: miror / axe B (default = Y) m_MirrorB = false; // true: miror / axe B (default = Y) m_SwapAxis = false; // false if A = X, B = Y; true if A =Y, B = Y m_ImageOffset.x = m_ImageOffset.y = 0; // Coord Offset, from IO command m_Offset.x = m_Offset.y = 0; // Coord Offset, from OF command m_Rotation = 0; // Allowed 0, 90, 180, 270 m_Has_DCode = false; // true = DCodes in file m_Has_DCode = false; // true = DCodes in file // false = no DCode-> // false = no DCode-> // search for separate DCode file // search for separate DCode file m_FmtScale.x = m_FmtScale.y = 4; // Initialize default format to 3.4 => 4 m_FmtScale.x = m_FmtScale.y = 4; // Initialize default format to 3.4 => 4 m_FmtLen.x = m_FmtLen.y = 3 + 4; // Initialize default format len = 3+4 m_FmtLen.x = m_FmtLen.y = 3 + 4; // Initialize default format len = 3+4 m_LayerScale.x = m_LayerScale.y = 1.0; // scale (A and B) this layer m_LayerScale.x = m_LayerScale.y = 1.0; // scale (A and B) this layer m_Rotation = 0; // Allowed 0, 90, 180, 270 m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ. m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ. m_360Arc_enbl = false; // 360 deg circular m_360Arc_enbl = false; // 360 deg circular // interpolation disable // interpolation disable Loading gerbview/class_GERBER.h +10 −7 Original line number Original line Diff line number Diff line Loading @@ -38,15 +38,17 @@ public: bool m_GerbMetric; // false = Inches, true = metric bool m_GerbMetric; // false = Inches, true = metric bool m_Relative; // false = absolute Coord, true = relative Coord bool m_Relative; // false = absolute Coord, true = relative Coord bool m_NoTrailingZeros; // true: remove tailing zeros. bool m_NoTrailingZeros; // true: remove tailing zeros. bool m_MirorA; // true: miror / axe A (X) bool m_SwapAxis; // false (default) if A = X and B = Y bool m_MirorB; // true: miror / axe B (Y) // true if A = Y, B = X bool m_Has_DCode; // true = DCodes in file bool m_MirrorA; // true: miror / axe A (X) // (false = no DCode -> separate DCode file bool m_MirrorB; // true: miror / axe B (Y) wxPoint m_Offset; // Coord Offset wxPoint m_ImageOffset; // Coord Offset, from IO command wxPoint m_Offset; // Coord Offset, from OF command wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4 wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4 wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5 wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5 wxRealPoint m_LayerScale; // scale (X and Y) of layer. wxRealPoint m_LayerScale; // scale (X and Y) of layer. int m_Rotation; int m_Rotation; // Image rotation (0, 90, 180, 270 // Note these values are stored in 0.1 degrees int m_Iterpolation; // Linear, 90 arc, Circ. int m_Iterpolation; // Linear, 90 arc, Circ. bool m_ImageNegative; // true = Negative image bool m_ImageNegative; // true = Negative image int m_Current_Tool; // Current Tool (Dcode) number selected int m_Current_Tool; // Current Tool (Dcode) number selected Loading @@ -62,7 +64,8 @@ public: int m_FilesPtr; // Stack pointer for files list int m_FilesPtr; // Stack pointer for files list int m_Selected_Tool; // For hightlight: current selected Dcode int m_Selected_Tool; // For hightlight: current selected Dcode bool m_Has_DCode; // true = DCodes in file // (false = no DCode -> separate DCode file bool m_360Arc_enbl; // Enbl 360 deg circular interpolation bool m_360Arc_enbl; // Enbl 360 deg circular interpolation bool m_PolygonFillMode; // Enable polygon mode (read coord as a polygon descr) bool m_PolygonFillMode; // Enable polygon mode (read coord as a polygon descr) int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm Loading gerbview/class_aperture_macro.cpp +34 −25 Original line number Original line Diff line number Diff line Loading @@ -147,6 +147,7 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, * type is not stored in parameters list, so the first parameter is exposure * type is not stored in parameters list, so the first parameter is exposure */ */ curPos += mapPt( params[2].GetValue( tool ), params[3].GetValue( tool ), gerberMetric ); curPos += mapPt( params[2].GetValue( tool ), params[3].GetValue( tool ), gerberMetric ); curPos = aParent->GetABPosition( curPos ); int radius = scale( params[1].GetValue( tool ), gerberMetric ) / 2; int radius = scale( params[1].GetValue( tool ), gerberMetric ) / 2; if( !aFilledShape ) if( !aFilledShape ) GRCircle( aClipBox, aDC, curPos, radius, 0, aColor ); GRCircle( aClipBox, aDC, curPos, radius, 0, aColor ); Loading @@ -170,12 +171,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -196,12 +200,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -222,12 +229,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -255,11 +265,14 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, subshape_poly = polybuffer; subshape_poly = polybuffer; int sub_rotation = rotation + 900 * ii; int sub_rotation = rotation + 900 * ii; for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) RotatePoint( &subshape_poly[jj], sub_rotation ); RotatePoint( &subshape_poly[jj], -sub_rotation ); // Move to current position: // Move to current position: for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) { subshape_poly[jj] += curPos; subshape_poly[jj] += curPos; subshape_poly[jj] = aParent->GetABPosition( subshape_poly[jj] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, subshape_poly.size(), &subshape_poly[0], true, aAltColor, subshape_poly.size(), &subshape_poly[0], true, aAltColor, Loading @@ -283,6 +296,8 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, int gap = scale( params[4].GetValue( tool ), gerberMetric ); int gap = scale( params[4].GetValue( tool ), gerberMetric ); int numCircles = wxRound( params[5].GetValue( tool ) ); int numCircles = wxRound( params[5].GetValue( tool ) ); // Draw circles: wxPoint center = aParent->GetABPosition( curPos ); // adjust outerDiam by this on each nested circle // adjust outerDiam by this on each nested circle int diamAdjust = (gap + penThickness); //*2; //Should we use * 2 ? int diamAdjust = (gap + penThickness); //*2; //Should we use * 2 ? for( int i = 0; i < numCircles; ++i, outerDiam -= diamAdjust ) for( int i = 0; i < numCircles; ++i, outerDiam -= diamAdjust ) Loading @@ -292,12 +307,12 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( !aFilledShape ) if( !aFilledShape ) { { // draw the border of the pen's path using two circles, each as narrow as possible // draw the border of the pen's path using two circles, each as narrow as possible GRCircle( aClipBox, aDC, curPos, outerDiam / 2, 0, aColor ); GRCircle( aClipBox, aDC, center, outerDiam / 2, 0, aColor ); GRCircle( aClipBox, aDC, curPos, outerDiam / 2 - penThickness, 0, aColor ); GRCircle( aClipBox, aDC, center, outerDiam / 2 - penThickness, 0, aColor ); } } else // Filled mode else // Filled mode { { GRCircle( aClipBox, aDC, curPos, GRCircle( aClipBox, aDC, center, (outerDiam - penThickness) / 2, penThickness, aColor ); (outerDiam - penThickness) / 2, penThickness, aColor ); } } } } Loading @@ -305,17 +320,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, // Draw the cross: // Draw the cross: ConvertShapeToPolygon( aParent, polybuffer, gerberMetric ); ConvertShapeToPolygon( aParent, polybuffer, gerberMetric ); // shape rotation: rotation = wxRound( params[8].GetValue( tool ) * 10.0 ); rotation = wxRound( params[8].GetValue( tool ) * 10.0 ); if( rotation ) { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); { } // shape rotation: RotatePoint( &polybuffer[ii], -rotation ); // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -344,13 +357,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, // shape rotation: // shape rotation: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { { NEGATE(polybuffer[ii].y); RotatePoint( &polybuffer[ii], -rotation ); RotatePoint( &polybuffer[ii], rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -372,9 +387,9 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, rotation = wxRound( params[5].GetValue( tool ) * 10.0 ); rotation = wxRound( params[5].GetValue( tool ) * 10.0 ); for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { { NEGATE(polybuffer[ii].y); RotatePoint( &polybuffer[ii], -rotation ); RotatePoint( &polybuffer[ii], rotation ); polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -441,7 +456,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, { { RotatePoint( &aBuffer[ii], -angle ); RotatePoint( &aBuffer[ii], -angle ); aBuffer[ii] += start; aBuffer[ii] += start; NEGATE( aBuffer[ii].y ); } } } } break; break; Loading Loading @@ -471,7 +485,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, tool ), aUnitsMetric ); tool ), aUnitsMetric ); // Build poly: // Build poly: NEGATE( lowerLeft.y ); aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); lowerLeft.y += size.y; // Upper left lowerLeft.y += size.y; // Upper left aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); Loading @@ -479,10 +492,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); lowerLeft.y -= size.y; // lower right lowerLeft.y -= size.y; // lower right aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); // Negate y coordinates: for( unsigned ii = 0; ii < aBuffer.size(); ii++ ) NEGATE( aBuffer[ii].y ); } } break; break; Loading Loading
common/gr_basic.cpp +29 −20 Original line number Original line Diff line number Diff line Loading @@ -82,8 +82,8 @@ static void GRSFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle int EndAngle, int r, int width, int Color, int BgColor ); int EndAngle, int r, int width, int Color, int BgColor ); static void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, static void GRSCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int aPenSize, int Color ); int width, int aPenSize, int Color ); static void GRSFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, static void GRSLineArray( EDA_Rect* ClipBox, wxDC* DC, wxPoint points[], int width, int Color ); int lines, int width, int Color ); /**/ /**/ extern BASE_SCREEN* ActiveScreen; extern BASE_SCREEN* ActiveScreen; Loading Loading @@ -990,6 +990,13 @@ void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, GRMapY( y2 ), ZoomValue( width ), 0, Color ); GRMapY( y2 ), ZoomValue( width ), 0, Color ); } } void GRCSegm( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor ) { GRSCSegm( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), ZoomValue( aWidth ), 0, aColor ); } /* /* * Draw segment (full) with rounded ends in object space (real coords.). * Draw segment (full) with rounded ends in object space (real coords.). Loading @@ -997,24 +1004,17 @@ void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color ) int width, int Color ) { { GRSFillCSegm( ClipBox, DC, GRMapX( x1 ), GRMapY( y1 ), GRMapX( x2 ), WinClipAndDrawLine( ClipBox, DC, GRMapX( x1 ), GRMapY( y1 ), GRMapX( x2 ), GRMapY( y2 ), ZoomValue( width ), Color ); GRMapY( y2 ), Color, ZoomValue( width ) ); } } /* void GRFilledSegment( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, * Draw segment with rounded ends in screen space. int aWidth, int aColor ) */ void GRSFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color ) { { WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, Color, width ); WinClipAndDrawLine( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), aColor, ZoomValue( aWidth ) ); } } Loading Loading @@ -1498,6 +1498,15 @@ void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, Color ); Color ); } } void GRArc1( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, wxPoint aCenter, int aWidth, int aColor ) { GRSArc1( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ), GRMapX( aCenter.x ), GRMapY( aCenter.y ), ZoomValue( aWidth ), aColor ); } /* /* * Draw an arc, width = width, in screen space. * Draw an arc, width = width, in screen space. Loading
gerbview/block.cpp +3 −20 Original line number Original line Diff line number Diff line Loading @@ -45,9 +45,6 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC, wxDC* DC, bool erase ); bool erase ); static bool IsGbrItemInBox( BLOCK_SELECTOR& aBlocklocate, GERBER_DRAW_ITEM* aItem ); /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to /* Return the block command (BLOCK_MOVE, BLOCK_COPY...) corresponding to * the key (ALT, SHIFT ALT ..) * the key (ALT, SHIFT ALT ..) */ */ Loading Loading @@ -292,7 +289,7 @@ void WinEDA_GerberFrame::Block_Delete( wxDC* DC ) { { nextitem = item->Next(); nextitem = item->Next(); GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) gerb_item->DeleteStructure(); gerb_item->DeleteStructure(); } } Loading Loading @@ -324,7 +321,7 @@ void WinEDA_GerberFrame::Block_Move( wxDC* DC ) for( ; item; item = item->Next() ) for( ; item; item = item->Next() ) { { GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) gerb_item->Move( delta ); gerb_item->Move( delta ); } } Loading Loading @@ -355,7 +352,7 @@ void WinEDA_GerberFrame::Block_Duplicate( wxDC* DC ) for( ; item; item = item->Next() ) for( ; item; item = item->Next() ) { { GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; if( IsGbrItemInBox( GetScreen()->m_BlockLocate, gerb_item ) ) if( gerb_item->HitTest( GetScreen()->m_BlockLocate ) ) { { /* this item must be duplicated */ /* this item must be duplicated */ BOARD_ITEM* new_item = gerb_item->Copy(); BOARD_ITEM* new_item = gerb_item->Copy(); Loading @@ -367,17 +364,3 @@ void WinEDA_GerberFrame::Block_Duplicate( wxDC* DC ) DrawPanel->Refresh(); DrawPanel->Refresh(); } } /* Test if the structure PtStruct is inside the block * Returns true or false */ bool IsGbrItemInBox( BLOCK_SELECTOR& aBlocklocate, GERBER_DRAW_ITEM* aItem ) { if( aBlocklocate.Inside( aItem->m_Start ) ) return true; if( aBlocklocate.Inside( aItem->m_End ) ) return true; return false; }
gerbview/class_GERBER.cpp +8 −6 Original line number Original line Diff line number Diff line Loading @@ -123,21 +123,23 @@ void GERBER::ResetDefaultValues() m_LayerName = wxT( "no layer name" ); // Layer name from the LN command m_LayerName = wxT( "no layer name" ); // Layer name from the LN command m_LayerNegative = false; // true = Negative Layer m_LayerNegative = false; // true = Negative Layer m_ImageNegative = false; // true = Negative image m_ImageNegative = false; // true = Negative image m_GerbMetric = false; // false = Inches, true = metric m_GerbMetric = false; // false = Inches (default), true = metric m_Relative = false; // false = absolute Coord, m_Relative = false; // false = absolute Coord, // true = relative Coord // true = relative Coord m_NoTrailingZeros = false; // true: trailing zeros deleted m_NoTrailingZeros = false; // true: trailing zeros deleted m_MirorA = false; // true: miror / axe A (default = X) m_MirrorA = false; // true: miror / axe A (default = X) m_MirorB = false; // true: miror / axe B (default = Y) m_MirrorB = false; // true: miror / axe B (default = Y) m_SwapAxis = false; // false if A = X, B = Y; true if A =Y, B = Y m_ImageOffset.x = m_ImageOffset.y = 0; // Coord Offset, from IO command m_Offset.x = m_Offset.y = 0; // Coord Offset, from OF command m_Rotation = 0; // Allowed 0, 90, 180, 270 m_Has_DCode = false; // true = DCodes in file m_Has_DCode = false; // true = DCodes in file // false = no DCode-> // false = no DCode-> // search for separate DCode file // search for separate DCode file m_FmtScale.x = m_FmtScale.y = 4; // Initialize default format to 3.4 => 4 m_FmtScale.x = m_FmtScale.y = 4; // Initialize default format to 3.4 => 4 m_FmtLen.x = m_FmtLen.y = 3 + 4; // Initialize default format len = 3+4 m_FmtLen.x = m_FmtLen.y = 3 + 4; // Initialize default format len = 3+4 m_LayerScale.x = m_LayerScale.y = 1.0; // scale (A and B) this layer m_LayerScale.x = m_LayerScale.y = 1.0; // scale (A and B) this layer m_Rotation = 0; // Allowed 0, 90, 180, 270 m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ. m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ. m_360Arc_enbl = false; // 360 deg circular m_360Arc_enbl = false; // 360 deg circular // interpolation disable // interpolation disable Loading
gerbview/class_GERBER.h +10 −7 Original line number Original line Diff line number Diff line Loading @@ -38,15 +38,17 @@ public: bool m_GerbMetric; // false = Inches, true = metric bool m_GerbMetric; // false = Inches, true = metric bool m_Relative; // false = absolute Coord, true = relative Coord bool m_Relative; // false = absolute Coord, true = relative Coord bool m_NoTrailingZeros; // true: remove tailing zeros. bool m_NoTrailingZeros; // true: remove tailing zeros. bool m_MirorA; // true: miror / axe A (X) bool m_SwapAxis; // false (default) if A = X and B = Y bool m_MirorB; // true: miror / axe B (Y) // true if A = Y, B = X bool m_Has_DCode; // true = DCodes in file bool m_MirrorA; // true: miror / axe A (X) // (false = no DCode -> separate DCode file bool m_MirrorB; // true: miror / axe B (Y) wxPoint m_Offset; // Coord Offset wxPoint m_ImageOffset; // Coord Offset, from IO command wxPoint m_Offset; // Coord Offset, from OF command wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4 wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4 wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5 wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5 wxRealPoint m_LayerScale; // scale (X and Y) of layer. wxRealPoint m_LayerScale; // scale (X and Y) of layer. int m_Rotation; int m_Rotation; // Image rotation (0, 90, 180, 270 // Note these values are stored in 0.1 degrees int m_Iterpolation; // Linear, 90 arc, Circ. int m_Iterpolation; // Linear, 90 arc, Circ. bool m_ImageNegative; // true = Negative image bool m_ImageNegative; // true = Negative image int m_Current_Tool; // Current Tool (Dcode) number selected int m_Current_Tool; // Current Tool (Dcode) number selected Loading @@ -62,7 +64,8 @@ public: int m_FilesPtr; // Stack pointer for files list int m_FilesPtr; // Stack pointer for files list int m_Selected_Tool; // For hightlight: current selected Dcode int m_Selected_Tool; // For hightlight: current selected Dcode bool m_Has_DCode; // true = DCodes in file // (false = no DCode -> separate DCode file bool m_360Arc_enbl; // Enbl 360 deg circular interpolation bool m_360Arc_enbl; // Enbl 360 deg circular interpolation bool m_PolygonFillMode; // Enable polygon mode (read coord as a polygon descr) bool m_PolygonFillMode; // Enable polygon mode (read coord as a polygon descr) int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm Loading
gerbview/class_aperture_macro.cpp +34 −25 Original line number Original line Diff line number Diff line Loading @@ -147,6 +147,7 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, * type is not stored in parameters list, so the first parameter is exposure * type is not stored in parameters list, so the first parameter is exposure */ */ curPos += mapPt( params[2].GetValue( tool ), params[3].GetValue( tool ), gerberMetric ); curPos += mapPt( params[2].GetValue( tool ), params[3].GetValue( tool ), gerberMetric ); curPos = aParent->GetABPosition( curPos ); int radius = scale( params[1].GetValue( tool ), gerberMetric ) / 2; int radius = scale( params[1].GetValue( tool ), gerberMetric ) / 2; if( !aFilledShape ) if( !aFilledShape ) GRCircle( aClipBox, aDC, curPos, radius, 0, aColor ); GRCircle( aClipBox, aDC, curPos, radius, 0, aColor ); Loading @@ -170,12 +171,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -196,12 +200,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -222,12 +229,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( rotation ) if( rotation ) { { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); RotatePoint( &polybuffer[ii], -rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -255,11 +265,14 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, subshape_poly = polybuffer; subshape_poly = polybuffer; int sub_rotation = rotation + 900 * ii; int sub_rotation = rotation + 900 * ii; for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) RotatePoint( &subshape_poly[jj], sub_rotation ); RotatePoint( &subshape_poly[jj], -sub_rotation ); // Move to current position: // Move to current position: for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) for( unsigned jj = 0; jj < subshape_poly.size(); jj++ ) { subshape_poly[jj] += curPos; subshape_poly[jj] += curPos; subshape_poly[jj] = aParent->GetABPosition( subshape_poly[jj] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, subshape_poly.size(), &subshape_poly[0], true, aAltColor, subshape_poly.size(), &subshape_poly[0], true, aAltColor, Loading @@ -283,6 +296,8 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, int gap = scale( params[4].GetValue( tool ), gerberMetric ); int gap = scale( params[4].GetValue( tool ), gerberMetric ); int numCircles = wxRound( params[5].GetValue( tool ) ); int numCircles = wxRound( params[5].GetValue( tool ) ); // Draw circles: wxPoint center = aParent->GetABPosition( curPos ); // adjust outerDiam by this on each nested circle // adjust outerDiam by this on each nested circle int diamAdjust = (gap + penThickness); //*2; //Should we use * 2 ? int diamAdjust = (gap + penThickness); //*2; //Should we use * 2 ? for( int i = 0; i < numCircles; ++i, outerDiam -= diamAdjust ) for( int i = 0; i < numCircles; ++i, outerDiam -= diamAdjust ) Loading @@ -292,12 +307,12 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, if( !aFilledShape ) if( !aFilledShape ) { { // draw the border of the pen's path using two circles, each as narrow as possible // draw the border of the pen's path using two circles, each as narrow as possible GRCircle( aClipBox, aDC, curPos, outerDiam / 2, 0, aColor ); GRCircle( aClipBox, aDC, center, outerDiam / 2, 0, aColor ); GRCircle( aClipBox, aDC, curPos, outerDiam / 2 - penThickness, 0, aColor ); GRCircle( aClipBox, aDC, center, outerDiam / 2 - penThickness, 0, aColor ); } } else // Filled mode else // Filled mode { { GRCircle( aClipBox, aDC, curPos, GRCircle( aClipBox, aDC, center, (outerDiam - penThickness) / 2, penThickness, aColor ); (outerDiam - penThickness) / 2, penThickness, aColor ); } } } } Loading @@ -305,17 +320,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, // Draw the cross: // Draw the cross: ConvertShapeToPolygon( aParent, polybuffer, gerberMetric ); ConvertShapeToPolygon( aParent, polybuffer, gerberMetric ); // shape rotation: rotation = wxRound( params[8].GetValue( tool ) * 10.0 ); rotation = wxRound( params[8].GetValue( tool ) * 10.0 ); if( rotation ) { for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) RotatePoint( &polybuffer[ii], rotation ); { } // shape rotation: RotatePoint( &polybuffer[ii], -rotation ); // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -344,13 +357,15 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, // shape rotation: // shape rotation: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { { NEGATE(polybuffer[ii].y); RotatePoint( &polybuffer[ii], -rotation ); RotatePoint( &polybuffer[ii], rotation ); } } // Move to current position: // Move to current position: for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading @@ -372,9 +387,9 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, rotation = wxRound( params[5].GetValue( tool ) * 10.0 ); rotation = wxRound( params[5].GetValue( tool ) * 10.0 ); for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) for( unsigned ii = 0; ii < polybuffer.size(); ii++ ) { { NEGATE(polybuffer[ii].y); RotatePoint( &polybuffer[ii], -rotation ); RotatePoint( &polybuffer[ii], rotation ); polybuffer[ii] += curPos; polybuffer[ii] += curPos; polybuffer[ii] = aParent->GetABPosition( polybuffer[ii] ); } } GRClosedPoly( aClipBox, aDC, GRClosedPoly( aClipBox, aDC, polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); polybuffer.size(), &polybuffer[0], aFilledShape, aColor, aColor ); Loading Loading @@ -441,7 +456,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, { { RotatePoint( &aBuffer[ii], -angle ); RotatePoint( &aBuffer[ii], -angle ); aBuffer[ii] += start; aBuffer[ii] += start; NEGATE( aBuffer[ii].y ); } } } } break; break; Loading Loading @@ -471,7 +485,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, tool ), aUnitsMetric ); tool ), aUnitsMetric ); // Build poly: // Build poly: NEGATE( lowerLeft.y ); aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); lowerLeft.y += size.y; // Upper left lowerLeft.y += size.y; // Upper left aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); Loading @@ -479,10 +492,6 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent, aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); lowerLeft.y -= size.y; // lower right lowerLeft.y -= size.y; // lower right aBuffer.push_back( lowerLeft ); aBuffer.push_back( lowerLeft ); // Negate y coordinates: for( unsigned ii = 0; ii < aBuffer.size(); ii++ ) NEGATE( aBuffer[ii].y ); } } break; break; Loading