Beispiel #1
0
void
EraseObject (int type, void *lptr, void *ptr)
{
  switch (type)
    {
    case VIA_TYPE:
    case PIN_TYPE:
      ErasePin ((PinType *) ptr);
      break;
    case TEXT_TYPE:
    case ELEMENTNAME_TYPE:
      EraseText ((LayerType *)lptr, (TextType *) ptr);
      break;
    case POLYGON_TYPE:
      ErasePolygon ((PolygonType *) ptr);
      break;
    case ELEMENT_TYPE:
      EraseElement ((ElementType *) ptr);
      break;
    case LINE_TYPE:
    case ELEMENTLINE_TYPE:
    case RATLINE_TYPE:
      EraseLine ((LineType *) ptr);
      break;
    case PAD_TYPE:
      ErasePad ((PadType *) ptr);
      break;
    case ARC_TYPE:
    case ELEMENTARC_TYPE:
      EraseArc ((ArcType *) ptr);
      break;
    default:
      Message ("hace: Internal ERROR, trying to erase an unknown type\n");
    }
}
Beispiel #2
0
/* ---------------------------------------------------------------------------
 * erases all pins and pads of an element
 */
void
EraseElementPinsAndPads (ElementType *Element)
{
  PIN_LOOP (Element);
  {
    ErasePin (pin);
  }
  END_LOOP;
  PAD_LOOP (Element);
  {
    ErasePad (pad);
  }
  END_LOOP;
}
Beispiel #3
0
void *ChangePadClearSize( ElementTypePtr Element, PadTypePtr Pad )
{
  int eax;
  int ebx;
  int esi;
  BDimension value = Absolute;
  value = ( Pad->Clearance + Delta < ( PCB->Bloat + 1 ) * 2 ? Pad->Clearance + Delta : ( PCB->Bloat + 1 ) * 2 ) <= 0x989680 ? 0x989680 : Pad->Clearance + Delta < ( PCB->Bloat + 1 ) * 2 ? Pad->Clearance + Delta : ( PCB->Bloat + 1 ) * 2;
  if ( value + -100 <= 0x98961c && Pad->Clearance != value )
  {
    AddObjectToClearSizeUndoList( 512, (void*)Element, (void*)Pad, (void*)Pad );
    RestoreToPolygon( &PCB->Data, 512, (void*)Element, (void*)Pad );
    ErasePad( Pad );
    r_delete_entry( &PCB->Data->pad_tree, (int)( &Pad->BoundingBox ) );
    Pad->Clearance = value;
    SetElementBoundingBox( &PCB->Data, Element, &PCB->Font );
    ClearFromPolygon( &PCB->Data, 512, (void*)Element, (void*)Pad );
    DrawPad( Pad, 0 );
    return (void*)Pad;
  }
}
Beispiel #4
0
void *ChangePadSize( ElementTypePtr Element, PadTypePtr Pad )
{
  int eax;
  int ebx;
  int esi;
  int edi;
  BDimension value = Absolute;
  if ( value + -100 <= 0x98961c && Pad->Thickness != value )
  {
    AddObjectToSizeUndoList( 512, (void*)Element, (void*)Pad, (void*)Pad );
    AddObjectToMaskSizeUndoList( 512, (void*)Element, (void*)Pad, (void*)Pad );
    RestoreToPolygon( &PCB->Data, 512, (void*)Element, (void*)Pad );
    ErasePad( Pad );
    r_delete_entry( &PCB->Data->pad_tree, (int)( &Pad->BoundingBox ) );
    Pad->Thickness = value;
    Pad->Mask = ( Pad->Mask + value ) - Pad->Thickness;
    SetElementBoundingBox( &PCB->Data, Element, &PCB->Font );
    ClearFromPolygon( &PCB->Data, 512, (void*)Element, (void*)Pad );
    DrawPad( Pad, 0 );
    return (void*)Pad;
  }
}