We introduce a new discretization scheme for Maxwell equations in two space dimension. Inspired by the new paradigm of Isogeometric analysis introduced in Hughes et al. (2005) , we propose an algorithm based on the use of bivariate B-splines spaces suitably adapted to electromagnetics. We construct B-splines spaces of variable interelement regularity on the parametric domain. These spaces (and their push-forwards on the physical domain) form a De Rham diagram and we use them to solve the Maxwell source and eigen problem. Our scheme has the following features: (i) is adapted to treat complex geometries, (ii) is spectral correct, (iii) provides regular (e.g., globally C0) discrete solutions of Maxwell equations. © 2009 Elsevier B.V.