24气节 飞狐副图

[复制链接]
查看23 | 回复0 | 2022-6-28 09:05:03 | 显示全部楼层 |阅读模式

24气节

lm:=BARSLAST((not(lmonth>ref(lmonth,1))or BARPOS=1));
r1:=lmonth,LINETHICK;
春:=BARSLAST(not(r1>=1 and r1<=3)or BARPOS=1);//计算四季
夏:=BARSLAST(not(r1>=4 and r1<=6)or BARPOS=1);
秋:=BARSLAST(not(r1>=7 and r1<=9)or BARPOS=1);
冬:=BARSLAST(not(r1>=10 and r1<=12)or BARPOS=1);
drawyitext(lday<ref(lday,1) and 春,14,ganzhi(date,0,1),0)align3,COLORgreen;
drawyitext(lday<ref(lday,1) and 夏,14,ganzhi(date,0,1),0)align3,COLORred;
drawyitext(lday<ref(lday,1) and 秋,14,ganzhi(date,0,1),0)align3,COLORyellow;
drawyitext(lday<ref(lday,1) and 冬,14,ganzhi(date,0,1),0)align3,COLORwhite;
drawtext(lmonth=ref(lmonth,1) and lday<ref(lday,1) ,18,'闰');
{节气,仅显示节}
tj:=LSOLARTERM(date);
drawtext(tj=1 ,5,'小\n寒'),colorwhite;//drawtext(tj=2 ,2,'大\n寒');
drawtext(tj=3 ,5,'立\n春'),colorgreen;//drawtext(tj=4 ,2,'雨\n水');
drawtext(tj=5 ,5,'惊\n蛰'),colorgreen;drawtext(tj=6,8,'春\n分')colorcyan;
drawtext(tj=7 ,5,'清\n明'),colorgreen;//drawtext(tj=8 ,2,'谷\n雨');
drawtext(tj=9 ,5,'立\n夏'),colorred;  //drawtext(tj=10,2,'小\n满');
drawtext(tj=11,5,'芒\n种'),colorred;drawtext(tj=12,8,'夏\n至')colorcyan;
drawtext(tj=13,5,'小\n暑'),colorred;   //drawtext(tj=14,2,'大\n暑');
drawtext(tj=15,5,'立\n秋'),coloryellow;//drawtext(tj=16,2,'处\n暑');
drawtext(tj=17,5,'白\n露'),coloryellow;drawtext(tj=18,8,'秋\n分')colorcyan;
drawtext(tj=19,5,'寒\n露'),coloryellow; //drawtext(tj=20,2,'霜\n降');
drawtext(tj=21,5,'立\n冬'),colorwhite;  //drawtext(tj=22,2,'小\n雪');
drawtext(tj=23,5,'大\n雪'),colorwhite;drawtext(tj=24,8,'冬\n至')colorcyan;
stickline(not(mod(tj,2)=0) and tj<>0,-4,0,2,0),COLORred;{节,划红线}
stickline(mod(tj,2)=0 and tj<>0 ,0,3,1,0),COLORYELLOW;{气,划黄线}
{巨石阵}
fz:=tj<>0 and not(mod(tj,6));{取二分二至}
yw:=not(BETWEEN(lday,28,3)); {取农历初一前后共5天}
yy:=BETWEEN(lday,13,17);{取农历十五前后共5天}
DRAWTEXT((fz and yw) or (fz and yy),-5,'巨石阵'),COLORred;
{大小暑在农历六月}
dxs:=if(tj=13 ,-4,0) ;dxs1:=if(tj=14,-4,0);{取大小暑}
ly6:=if(r1=6,-4,0);
DRAWTEXT(dxs and r1=6,-3,'小暑在未月');DRAWTEXT(dxs1 and r1=6,-2,'大暑在未月');
{大小寒在农历十二月,lxy加}
dxh:=if(tj=1,-4,0);dxh1:=if(tj=2,-4,0);{取大小寒}
ly12:=if(r1=12,-4,0);
DRAWTEXT(dxh and r1=12 ,-3,'小寒在丑月');DRAWTEXT(dxh1 and r1=12,-2,'大寒在丑月');
{节气遇初一十五}
//DRAWTEXT((tj and yw) or (tj and yy),-1,'一节五'),COLORYELLOW;{此句竖排}
DRAWICON((tj and yw) or (tj and yy),-14,12);{此句以图标表示}
DRAWICON(tj and (lday=1 or lday=15),-15,10);
drawtext(lday=1,-8,'朔') coloryellow;drawtext(lday=8,-8,'上弦') coloryellow;
drawtext(lday=15,-8,'望') coloryellow;drawtext(lday=23,-8,'下弦') coloryellow;

-18,colorblack;
 

200941512402571678.gif

200941512402571678.gif
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则