private PcbComponentBody ReadFootprintComponentBody(BinaryReader reader) { var body = new PcbComponentBody(); var parameters = ReadFootprintCommonParametersAndOutline(reader, body, body.Outline); body.ImportFromParameters(parameters); return(body); }
private void RenderComponentBodyPrimitive(Graphics g, PcbComponentBody body) { var brushColor = LayerMetadata.GetColor(body.Layer); using (var brush = new HatchBrush(HatchStyle.ForwardDiagonal, brushColor, Color.Transparent)) using (var pen = CreatePen(brushColor, 0)) { var outline = body.Outline.Select(coordxy => ScreenFromWorld(coordxy)).ToArray(); g.FillPolygon(brush, outline); g.DrawPolygon(pen, outline); } }
private void WriteFootprintComponentBody(BinaryWriter writer, PcbComponentBody body) { var parameters = body.ExportToParameters(); WriteFootprintCommonParametersAndOutline(writer, body, parameters, body.Outline); }