void DrawArc(Point2 p0, Point2 p1, double d) { if (fabs(d) <= DMAX) DrawLine(p0, p1); else { Vector2 v; Point2 pm, pb; double dSub; v.x = p1.x - p0.x; /* vector from p0 to p1 */ v.y = p1.y - p0.y; pm.x = p0.x + 0.5 * v.x; /* midpoint */ pm.y = p0.y + 0.5 * v.y; dSub = d / 4; V2Scale(&v, dSub); /* subdivided vector */ pb.x = pm.x - v.y; /* bisection point */ pb.y = pm.y + v.x; DrawArc(p0, pb, dSub); /* first half arc */ DrawArc(pb, p1, dSub); /* second half arc */ } }
/* --------------------------------------------------------------------------- * moves an arc between layers */ static void * MoveArcToLayer (LayerType *Layer, ArcType *Arc) { ArcTypePtr newone; if (TEST_FLAG (LOCKFLAG, Arc)) { Message (_("Sorry, the object is locked\n")); return NULL; } if (Dest == Layer && Layer->On) { DrawArc (Layer, Arc); Draw (); } if (((long int) Dest == -1) || Dest == Layer) return (Arc); AddObjectToMoveToLayerUndoList (ARC_TYPE, Layer, Arc, Arc); RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc); if (Layer->On) EraseArc (Arc); newone = (ArcTypePtr)MoveArcToLayerLowLevel (Layer, Arc, Dest); ClearFromPolygon (PCB->Data, ARC_TYPE, Dest, Arc); if (Dest->On) DrawArc (Dest, newone); Draw (); return (newone); }
void DrawShaft( AcGiWorldDraw* mode, const AcGePoint3d& pt, double radius ) { // 绘制外环 DrawCircle( mode, pt, radius, false ); // 绘制内环 DrawArc( mode, pt, radius * 0.8, PI / 6, PI, true ); DrawArc( mode, pt, radius * 0.8, PI * 7 / 6, PI, false ); }
static void DrawRoundedRect (double x, double y, double width, double height, double radius) { MovePen(x + radius, y); DrawLine(width -2*radius,0); // line across bottom DrawArc(radius,270,90); // arc on lower right corner DrawLine(0,height -2*radius); // line up right side DrawArc(radius,0,90); // arc on upper right corner DrawLine(-(width -2*radius), 0); // line across top DrawArc(radius,90,90); // arc on upper left corner DrawLine(0,-(height-2*radius)); // line down left side DrawArc(radius,180,90); // arc on lower left corner }
/***************************************************************** * XformPen *****************************************************************/ XformPen::XformPen( CGEST_INTptr &gest_int, CEvent &d, CEvent &m, CEvent &u) : Pen(str_ptr("xform"), gest_int, d, m, u) { // Set up GESTURE FSA (First matched will be executed) _draw_start += DrawArc(new GarbageGuard, drawCB(&XformPen::garbage_cb)); _draw_start += DrawArc(new DoubleTapGuard,drawCB(&XformPen::double_tap_cb)); _draw_start += DrawArc(new TapGuard,drawCB(&XformPen:: tap_cb)); _draw_start += DrawArc(new StrokeGuard, drawCB(&XformPen::stroke_cb)); }
void ImgMaskCreator::DrawLine( const std::vector<PointPair>& pairVect, const std::vector<Space>& position, PelGray8 lineVal) { static const double PIdiv180 = 3.1415926/180.0; if(m_img.IsNull()) return; m_position = position; m_boundLineVal = lineVal; m_img.Maximize(); size_t radius = GetRadius(); size_t size = pairVect.size(); for(size_t i=0; i<size; i++) { TPoint2D<long> point0 = pairVect[i].first; TPoint2D<long> point1 = pairVect[i].last; TPoint2D<long> diff = point1 - point0; if(8 * abs(diff.x()) < abs(diff.y()) || diff.Mag()<radius/3 ) { DrawLine(point0, point1); } else { DrawArc(point0, point1, radius); } } }
void RadarCanvas::Render_EBL_VRM(int w, int h) { static const uint8_t rgb[BEARING_LINES][3] = {{22, 129, 154}, {45, 255, 254}}; float full_range = wxMax(w, h) / 2.0; float center_x = w / 2.0; float center_y = h / 2.0; int display_range = m_ri->GetDisplayRange(); for (int b = 0; b < BEARING_LINES; b++) { if (m_ri->m_vrm[b] != 0.0) { float scale = m_ri->m_vrm[b] * 1852.0 * full_range / display_range; float angle = (float)deg2rad(m_ri->m_ebl[b]); float x = center_x + sinf(angle) * full_range * 2.; float y = center_y - cosf(angle) * full_range * 2.; glColor3ubv(rgb[b]); glLineWidth(1.0); glBegin(GL_LINES); glVertex2f(center_x, center_y); glVertex2f(x, y); glEnd(); DrawArc(center_x, center_y, scale, 0.f, 2.f * (float)PI, 360); } } }
void *ChangeArcClearSize( LayerTypePtr Layer, ArcTypePtr Arc ) { int eax; int edx; int ebx; int esi; BDimension value = Absolute; if ( ( Arc->Flags.f & 8224 ) != 32 || Arc->Clearance == ( ( value < ( PCB->Bloat + 1 ) * 2 ? value : ( PCB->Bloat + 1 ) * 2 ) <= 0x989680 ? 10000000 : value < ( PCB->Bloat + 1 ) * 2 ? value : ( PCB->Bloat + 1 ) * 2 ) ) { } AddObjectToClearSizeUndoList( 16384, (void*)Layer, (void*)Arc, (void*)Arc ); EraseArc( Arc ); r_delete_entry( &Layer->arc_tree, (int)( &Arc->BoundingBox ) ); RestoreToPolygon( &PCB->Data, 16384, (void*)Layer, (void*)Arc ); Arc->Clearance = value; if ( value == 0 ) { Arc->Flags.f &= -33; Arc->Clearance = 1000; } SetArcBoundingBox( Arc ); r_insert_entry( &Layer->arc_tree, (int)( &Arc->BoundingBox ), 0 ); ClearFromPolygon( &PCB->Data, 16384, (void*)Layer, (void*)Arc ); DrawArc( Layer, Arc, 0 ); return (void*)Arc; }
static bool HHVM_METHOD(ImagickDraw, arc, double sx, double sy, double ex, double ey, double sd, double ed) { auto wand = getDrawingWandResource(Object{this_}); DrawArc(wand->getWand(), sx, sy, ex, ey, sd, ed); return true; }
/* Function: DrawCircle Usage: DrawCircle(pt) ----------------------------------- Given a pointT point (pt), this function draws a circle of radius FILL_RADIUS and color FILL_COLOR around that point. */ void DrawCircle(pointT pt) { SetPenColor(FILL_COLOR); StartFilledRegion(PT_DENSITY); MovePen(pt.xp + FILL_RADIUS, pt.yp); DrawArc(FILL_RADIUS, 0, 360); EndFilledRegion(); }
void RadarCanvas::RenderRangeRingsAndHeading(int w, int h) { // Max range ringe float r = wxMax(w, h) / 2.0; // Position of the range texts float x = sinf((float)(0.25 * PI)) * r * 0.25; float y = cosf((float)(0.25 * PI)) * r * 0.25; float center_x = w / 2.0; float center_y = h / 2.0; // Size of rendered string in pixels int px; int py; glColor3ub(0, 126, 29); // same color as HDS glLineWidth(1.0); for (int i = 1; i <= 4; i++) { DrawArc(center_x, center_y, r * i * 0.25, 0.0, 2.0 * (float)PI, 360); const char *s = m_ri->GetDisplayRangeStr(i - 1); if (s) { m_FontNormal.RenderString(wxString::Format(wxT("%s"), s), center_x + x * (float)i, center_y + y * (float)i); } } if (m_pi->m_heading_source != HEADING_NONE) { double heading = (m_ri->IsDisplayNorthUp() ? 0 : m_pi->m_hdt) + 180.; double predictor = (m_ri->IsDisplayNorthUp() ? m_pi->m_hdt : 0) + 180.; x = -sinf(deg2rad(predictor)); y = cosf(deg2rad(predictor)); glBegin(GL_LINE_STRIP); glVertex2f(center_x, center_y); glVertex2f(center_x + x * r * 2, center_y + y * r * 2); glEnd(); for (int i = 0; i < 360; i += 5) { x = -sinf(deg2rad(i - heading)) * (r * 1.00 - 1); y = cosf(deg2rad(i - heading)) * (r * 1.00 - 1); wxString s; if (i % 90 == 0) { static char nesw[4] = {'N', 'E', 'S', 'W'}; s = wxString::Format(wxT("%c"), nesw[i / 90]); } else if (i % 15 == 0) { s = wxString::Format(wxT("%u"), i); } m_FontNormal.GetTextExtent(s, &px, &py); if (x > 0) { x -= px; } if (y > 0) { y -= py; } m_FontNormal.RenderString(s, center_x + x, center_y + y); } } }
static void DrawCenteredCircle(double radius, double cx, double cy, string color = "Black", bool isSolid = true) { string oldColor = GetPenColor(); SetPenColor(color); MovePen(cx + radius, cy); if (isSolid) StartFilledRegion(1.0); DrawArc(radius, 0, 360); if (isSolid) EndFilledRegion(); SetPenColor(oldColor); }
Drawing drawArc ( const QPen & pen , const QBrush & brush , const QRectF & rect , const double & startAngle , const double & spanAngle ) { return DrawArc( pen, brush, rect, startAngle, spanAngle ); }
EXPORT_C void CHuiCanvasGc::DrawEllipse(const THuiRealRect& aDestinationRect) { if (!iGc) { return; } double startx = aDestinationRect.iTl.iX + aDestinationRect.Width(); double starty = aDestinationRect.iTl.iY + aDestinationRect.Height()/2; DrawArc(aDestinationRect, THuiRealPoint(startx,starty), THuiRealPoint(startx,starty)); }
/* Function: DrawFilledCircleWithLabel * Usage: DrawFilledCircleWithLabel(center, .25, "Green", "You are here"); * ----------------------------------------------------------------------- * Uses facilities from extgraph to draw a circle filled with * color specified. The circle is centered at the given coord has the * specified radius. A label is drawn to the right of the circle. * If you don't want a label, pass the empty string. */ void DrawFilledCircleWithLabel(coordT center, double radius, string color, string label) { MovePen(center.x + radius, center.y); SetPenColor(color); StartFilledRegion(1.0); DrawArc(radius, 0, 360); EndFilledRegion(); MovePen(center.x + radius, center.y); SetFont("Helvetica"); SetPointSize(FONT_SIZE); DrawTextString(label); }
/* takes a robot number (only matter for colour), and a robot struct pointer */ void RobotDisplay(int r,struct Robot *robot) { int x1,x2,y1,y2; x2=(int)((double)WINDOW_H*robot->p_x); y2=(int)((double)WINDOW_H*robot->p_y); x1=(int)((double)WINDOW_H*robot->p_x1); y1=(int)((double)WINDOW_H*robot->p_y1); #if DISTY*(DISTY-1) Color(BLACK); DrawArc(x1-rw2,y1-rw2,rw1,rw1,0,23040); #endif Color(1+(5+0)%38); //Drwa them (int x, int y, int width, int height, int startAngle, int sweepAngle) DrawArc(x2-rw2,y2-rw2,rw1,rw1,0,23040); /*DrawLine(x1,y1,x2,y2);*/ robot->p_x1=robot->p_x; robot->p_y1=robot->p_y; }
void iterate(Point v1, Point v2, Point v3, Point currentPoint) { if (MouseButtonIsDown()) ExitGraphics(); MovePen(currentPoint.X, currentPoint.Y); StartFilledRegion(1); DrawArc(CIRCLE_SIZE, 0, 360); EndFilledRegion(); Point nextRand = randPoint(v1, v2, v3); currentPoint.X = 0.5 * (currentPoint.X + nextRand.X); currentPoint.Y = 0.5 * (currentPoint.Y + nextRand.Y); UpdateDisplay(); iterate(v1, v2, v3, currentPoint); }
NPRPen::NPRPen( CGEST_INTptr &gest_int, CEvent& d, CEvent& m, CEvent& u, CEvent& shift_down, CEvent& shift_up, CEvent& ctrl_down, CEvent& ctrl_up) : Pen("Basecoat", gest_int, d, m, u, shift_down, shift_up, ctrl_down, ctrl_up) { // gestures we recognize: _draw_start += DrawArc(new TapGuard, drawCB(&NPRPen::tap_cb)); _draw_start += DrawArc(new SlashGuard, drawCB(&NPRPen::slash_cb)); _draw_start += DrawArc(new LineGuard, drawCB(&NPRPen::line_cb)); _draw_start += DrawArc(new ScribbleGuard, drawCB(&NPRPen::scribble_cb)); _draw_start += DrawArc(new LassoGuard, drawCB(&NPRPen::lasso_cb)); _draw_start += DrawArc(new StrokeGuard, drawCB(&NPRPen::stroke_cb)); // let's us override the drawing of gestures: _gesture_drawer = new FooGestureDrawer(); _prev_gesture_drawer = nullptr; // ui vars: _curr_npr_tex = nullptr; _ui = new NPRPenUI(this); assert(_ui); }
void *ChangeArcJoin( LayerTypePtr Layer, ArcTypePtr Arc ) { int esi; EraseArc( Arc ); RestoreToPolygon( &PCB->Data, 16384, (void*)Layer, (void*)Arc ); AddObjectToClearPolyUndoList( 16384, (void*)Layer, (void*)Arc, (void*)Arc, 0 ); AddObjectToFlagUndoList( 16384, (void*)Layer, (void*)Arc, (void*)Arc ); Arc->Flags.f ^= 32; ClearFromPolygon( &PCB->Data, 16384, (void*)Layer, (void*)Arc ); AddObjectToClearPolyUndoList( 16384, (void*)Layer, (void*)Arc, (void*)Arc, 1 ); DrawArc( Layer, Arc, 0 ); return (void*)Arc; }
void DrawPathfinderNode(pointT center, string color, string label) { MovePen(center.x + NODE_RADIUS, center.y); SetPenColor(color); StartFilledRegion(1.0); DrawArc(NODE_RADIUS, 0, 360); EndFilledRegion(); if (!label.empty()) { MovePen(center.x + NODE_RADIUS + 2, center.y + 0.4 * GetFontAscent()); SetFont("Helvetica"); SetPointSize(FONT_SIZE); DrawTextString(label); } }
/* {{{ proto GmagickDraw GmagickDraw::arc(float sx, float sy, float ex, float ey, float sd, float ed) Draws an arc falling within a specified bounding rectangle on the image. */ PHP_METHOD(gmagickdraw, arc) { double sx, sy, ex, ey, sd, ed; php_gmagickdraw_object *internd; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddddd", &sx, &sy, &ex, &ey, &sd, &ed) == FAILURE) { return; } internd = (php_gmagickdraw_object *)zend_object_store_get_object(getThis() TSRMLS_CC); DrawArc(internd->drawing_wand, sx, sy, ex, ey, sd, ed); GMAGICK_CHAIN_METHOD; }
/* Function: DrawFilledCircleWithLabel * Usage: DrawFilledCircleWithLabel(center, "Green", "You are here"); * ------------------------------------------------------------------- * Uses facilities from extgraph to draw a circle filled with * color specified. The circle is centered at the given coord has the * specified radius. A label is drawn to the right of the circle. * You can leave off the last argument if no label is desired. */ void DrawFilledCircleWithLabel(coordT center, string color, string label) { MovePen(center.x + CircleRadius, center.y); SetPenColor(color); StartFilledRegion(1.0); DrawArc(CircleRadius, 0, 360); EndFilledRegion(); if (!label.empty()) { MovePen(center.x + CircleRadius, center.y); SetFont("Helvetica"); SetPointSize(LabelFontSize); DrawTextString(label); } }
/* --------------------------------------------------------------------------- * draws the package of an element */ void DrawElementPackage (ElementType *Element) { ELEMENTLINE_LOOP (Element); { DrawLine (NULL, line); } END_LOOP; ARC_LOOP (Element); { DrawArc (NULL, arc); } END_LOOP; }
void DiagramWindow::Draw2(RNAStructure** structures, const int resolution) { float centerX = 0.0f; float centerY = 0.0f; float angleBase = 0.0f; float angleDelta = 0.0f; float radius = 0.0f; unsigned int numBases = structures[0]->GetLength(); ComputeDiagramParams(numBases, resolution, centerX, centerY, angleBase, angleDelta, radius); for (unsigned int ui = 0; ui < numBases; ++ui) { const RNAStructure::BaseData* baseData1 = structures[0]->GetBaseAt(ui); DrawBase(ui, baseData1->m_base, centerX, centerY, angleBase, angleDelta, radius + 7.5f); const RNAStructure::BaseData* baseData2 = structures[1]->GetBaseAt(ui); if (baseData1->m_pair != RNAStructure::UNPAIRED && baseData1->m_pair > ui) { if (baseData1->m_pair == baseData2->m_pair) { fl_color(FL_WHITE); DrawArc(ui, baseData1->m_pair, centerX, centerY, angleBase, angleDelta, radius); } else { fl_color(FL_RED); DrawArc(ui, baseData1->m_pair, centerX, centerY, angleBase, angleDelta, radius); } } else if (baseData2->m_pair != RNAStructure::UNPAIRED && baseData2->m_pair > ui) { fl_color(FL_GREEN); DrawArc(ui, baseData2->m_pair, centerX, centerY, angleBase, angleDelta, radius); } } }
void DrawObject (int type, void *ptr1, void *ptr2) { switch (type) { case VIA_TYPE: if (PCB->ViaOn) DrawVia ((PinType *) ptr2); break; case LINE_TYPE: if (((LayerType *) ptr1)->On) DrawLine ((LayerType *) ptr1, (LineType *) ptr2); break; case ARC_TYPE: if (((LayerType *) ptr1)->On) DrawArc ((LayerType *) ptr1, (ArcType *) ptr2); break; case TEXT_TYPE: if (((LayerType *) ptr1)->On) DrawText ((LayerType *) ptr1, (TextType *) ptr2); break; case POLYGON_TYPE: if (((LayerType *) ptr1)->On) DrawPolygon ((LayerType *) ptr1, (PolygonType *) ptr2); break; case ELEMENT_TYPE: if (PCB->ElementOn && (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn)) DrawElement ((ElementType *) ptr2); break; case RATLINE_TYPE: if (PCB->RatOn) DrawRat ((RatType *) ptr2); break; case PIN_TYPE: if (PCB->PinOn) DrawPin ((PinType *) ptr2); break; case PAD_TYPE: if (PCB->PinOn) DrawPad ((PadType *) ptr2); break; case ELEMENTNAME_TYPE: if (PCB->ElementOn && (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn)) DrawElementName ((ElementType *) ptr1); break; } }
/* --------------------------------------------------------------------------- * copies an arc */ static void * CopyArc (LayerType *Layer, ArcType *Arc) { ArcType *arc; arc = CreateNewArcOnLayer (Layer, Arc->X + DeltaX, Arc->Y + DeltaY, Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta, Arc->Thickness, Arc->Clearance, MaskFlags (Arc->Flags, NOCOPY_FLAGS)); if (!arc) return (arc); DrawArc (Layer, arc); AddObjectToCreateUndoList (ARC_TYPE, Layer, arc, arc); return (arc); }
void FStereoLayerComponentVisualizer::DrawVisualization( const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI ) { const UStereoLayerComponent* StereoLayerComp = Cast<const UStereoLayerComponent>(Component); if(StereoLayerComp != NULL) { FLinearColor YellowColor = FColor(231, 239, 0, 255); if(StereoLayerComp->StereoLayerShape == EStereoLayerShape::SLSH_QuadLayer) { const FVector2D QuadSize = StereoLayerComp->GetQuadSize() / 2.0f; const FBox QuadBox(FVector(0.0f, -QuadSize.X, -QuadSize.Y), FVector(0.0f, QuadSize.X, QuadSize.Y)); DrawWireBox(PDI, StereoLayerComp->ComponentToWorld.ToMatrixWithScale(), QuadBox, YellowColor, 0); } else if(StereoLayerComp->StereoLayerShape == EStereoLayerShape::SLSH_CylinderLayer) { float ArcAngle = StereoLayerComp->CylinderOverlayArc * 180 / (StereoLayerComp->CylinderRadius * PI); FVector X = StereoLayerComp->ComponentToWorld.GetUnitAxis(EAxis::Type::X); FVector Y = StereoLayerComp->ComponentToWorld.GetUnitAxis(EAxis::Type::Y); FVector Base = StereoLayerComp->ComponentToWorld.GetLocation(); FVector HalfHeight = FVector(0, 0, StereoLayerComp->CylinderHeight/2); FVector LeftVertex = Base + StereoLayerComp->CylinderRadius * ( FMath::Cos(ArcAngle/2 * (PI/180.0f)) * X + FMath::Sin(ArcAngle/2 * (PI/180.0f)) * Y ); FVector RightVertex = Base + StereoLayerComp->CylinderRadius * ( FMath::Cos(-ArcAngle/2 * (PI/180.0f)) * X + FMath::Sin(-ArcAngle/2 * (PI/180.0f)) * Y ); DrawArc(PDI, Base + HalfHeight, X, Y, -ArcAngle/2, ArcAngle/2, StereoLayerComp->CylinderRadius, 10, YellowColor, 0); DrawArc(PDI, Base - HalfHeight, X, Y, -ArcAngle/2, ArcAngle/2, StereoLayerComp->CylinderRadius, 10, YellowColor, 0); PDI->DrawLine( LeftVertex - HalfHeight, LeftVertex + HalfHeight, YellowColor, 0 ); PDI->DrawLine( RightVertex - HalfHeight, RightVertex + HalfHeight, YellowColor, 0 ); } } }
void OnPaint(HWND hWnd){ PAINTSTRUCT ps = {0}; HDC hdc = BeginPaint(hWnd,&ps); HPEN hPen = CreatePen(PS_DASH,10,RGB(255,0,0)); //HBRUSH hBrush = CreateSolidBrush(RGB(0,255,0)); //HGDIOBJ hBrush = GetStockObject(NULL_BRUSH); HBITMAP hBmp = LoadBitmap(g_hInstance,MAKEINTRESOURCE(IDB_BITMAP1)); HBRUSH hBrush = CreatePatternBrush(hBmp); HGDIOBJ nOldPen = SelectObject(hdc,hBrush); int nOldMode = SetMapMode(hdc,MM_ISOTROPIC); SetWindowExtEx(hdc,1,1,NULL); SetViewportExtEx(hdc,1,2,NULL); switch(g_kind){ case ID_ARC: DrawArc(hdc); break; case ID_POINT: DrawPoint(hdc); break; case ID_LINE: DrawLine(hdc); break; case ID_RECT: DrawRect(hdc); break; case ID_ROUNDRECT: DrawRoundRect(hdc); break; case ID_CIRCLE: DrawCircle(hdc); break; case ID_BMP: DrawBmp(hdc); break; } SelectObject(hdc,nOldPen); //DeleteObject(hPen); SetMapMode(hdc,nOldMode); EndPaint(hWnd,&ps); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CWeaponBugBait::ItemPostFrame( void ) { CBasePlayer *pOwner = ToBasePlayer( GetOwner() ); if ( pOwner == NULL ) return; // See if we're cocked and ready to throw if ( m_bDrawBackFinished ) { DrawArc(); if ( ( pOwner->m_nButtons & IN_ATTACK ) == false ) { SendWeaponAnim( ACT_VM_THROW ); m_flNextPrimaryAttack = gpGlobals->curtime + SequenceDuration(); HideArc(); m_bDrawBackFinished = false; } } else { //See if we're attacking if ( ( pOwner->m_nButtons & IN_ATTACK ) && ( m_flNextPrimaryAttack < gpGlobals->curtime ) ) { PrimaryAttack(); } else if ( ( pOwner->m_nButtons & IN_ATTACK2 ) && ( m_flNextSecondaryAttack < gpGlobals->curtime ) ) { SecondaryAttack(); } } if ( m_bRedraw ) { if ( IsViewModelSequenceFinished() ) { Reload(); } } WeaponIdle(); }
/* --------------------------------------------------------------------------- * moves an arc */ static void * MoveArc (LayerTypePtr Layer, ArcTypePtr Arc) { RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc); r_delete_entry (Layer->arc_tree, (BoxType *)Arc); if (Layer->On) { EraseArc (Arc); MOVE_ARC_LOWLEVEL (Arc, DeltaX, DeltaY); DrawArc (Layer, Arc); Draw (); } else { MOVE_ARC_LOWLEVEL (Arc, DeltaX, DeltaY); } r_insert_entry (Layer->arc_tree, (BoxType *)Arc, 0); ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, Arc); return (Arc); }