-- Roots style file
-- Saved by the Roots style editor

--*MA50B50H100T0C0W30I100S24O0FHomerton.Bold.Oblique
--*PW280H100
--*SFX11Y-11W280H100T0O4210752000EcM0
--*SFX10Y-10W280H100T0O4042321920EcM0
--*SFX9Y-9W280H100T0O3873891840EcM0
--*SLX140Y100W140H150T0O0eCM1
--*SFX8Y-8W280H100T0O3705461760EcM0
--*SFX7Y-7W280H100T0O3537031680EcM0
--*SFX6Y-6W280H100T0O3368601600EcM0
--*SFX5Y-5W280H100T0O3200171520EcM0
--*SFX4Y-4W280H100T0O3031741440EcM0
--*SFX3Y-3W280H100T0O2863311360EcM0
--*SFX2Y-2W280H100T0O2694881280EcM0
--*SFX1Y-1W280H100T0O2526451200EcM0
--*SFX0Y0W280H100T0O4294967040EcM0
--*SRX0Y0W280H100T0O0EcM0
--*TIMX140Y60S12C16711680esV1FTrinity.Medium:Tfullname
--*TIMX140Y20S12C0exV1FTrinity.Medium:Tdate of birth
--*RW84H100
--*SLX0Y30W84H30T0O0EcM0
--*SLX0Y70W84H70T0O0EcM0
--*SLX42Y30W42H-50T0O0eCM1


gapheightabove=50;
gapheightbelow=50;
personwidth=280;
personheight=100;
gapwidth=100;
marriagewidth=84;
windowborder=30;
titleheight=100;

fontt0=ClaimFont("Homerton.Bold.Oblique",24);
fontp14=ClaimFont("Trinity.Medium",12);
fontp15=ClaimFont("Trinity.Medium",12);

function PersonChanged(person)
w=personwidth;
SetWidth(person,w);
end

function RedrawLine(x,y,width,height)
PlotLine(x,y,x+width,y+height,0,0);
end

function RedrawPerson(person,x,y,width,height)
m=width-personwidth;
mh=m/2;
PlotRectangleFilled(x+11,y+-11,280+m,100,4210752000);
PlotRectangleFilled(x+10,y+-10,280+m,100,4042321920);
PlotRectangleFilled(x+9,y+-9,280+m,100,3873891840);
if GetParentsMarriage(person) then PlotLine(x+140+mh,y+100,x+140+mh,y+150,0,0); end
PlotRectangleFilled(x+8,y+-8,280+m,100,3705461760);
PlotRectangleFilled(x+7,y+-7,280+m,100,3537031680);
PlotRectangleFilled(x+6,y+-6,280+m,100,3368601600);
PlotRectangleFilled(x+5,y+-5,280+m,100,3200171520);
PlotRectangleFilled(x+4,y+-4,280+m,100,3031741440);
PlotRectangleFilled(x+3,y+-3,280+m,100,2863311360);
PlotRectangleFilled(x+2,y+-2,280+m,100,2694881280);
PlotRectangleFilled(x+1,y+-1,280+m,100,2526451200);
PlotRectangleFilled(x+0,y+0,280+m,100,4294967040);
PlotRectangle(x+0,y+0,280+m,100,0,0);
colour=16711680;
sex=GetField(person,"sex");if sex=="M" then colour=4278190080 end
if sex=="F" then colour=65280 end
text=GetField(person,"fullname");
tx=GetTextDimensions(fontp14,text);
PlotText(x+140+mh-tx/2,y+60,fontp14,4294967040,colour,text)
colour=0;
text=GetField(person,"date of birth");
tx=GetTextDimensions(fontp15,text);
PlotText(x+140+mh-tx/2,y+20,fontp15,4294967040,colour,text)
end

function RedrawMarriage(marriage,x,y,width,height)
m=width-marriagewidth;
mh=m/2;
PlotLine(x+0,y+30,x+84+m,y+30,0,0);
PlotLine(x+0,y+70,x+84+m,y+70,0,0);
if GetChild(marriage) then PlotLine(x+42+mh,y+30,x+42+mh,y+-50,0,0); end
end

function RedrawTitle(title,x,y,width,height)
tx=GetTextDimensions(fontt0,title);
PlotText(x+(width-tx)/2,y+height/2,fontt0,4294967040,0,title);
end

