?? myedit.~pas
字號:
begin
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(0,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(0,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(0,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=3 then
begin
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(0,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(1,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(1,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=4 then
begin
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(1,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(0,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(0,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
end
else if (k1=5) then
begin
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(1,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=color;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(1,2,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(0,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(2,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$ffffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(1,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmp.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(1,1,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
end
else
begin
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(0,0,str1);
bmp.Canvas.Draw(x,y+yoff,bmptemp);
end;
end;
end;
x:=x+kw;
j:=j+k;
kk:=kk+k;
end;
y:=y+tpstr[i].lineheight+yy;
i:=i+1;
end;
if Fdataflag=false then
begin
kct:=Getimagecount;
for i:=0 to kct-1 do
begin
str1:=Getimage(i);
val(str1,dispno,k);
delete(str1,1,k);
val(str1,aleft,k);
if (str1<>'') and (str1[1]='-') then aleft:=-1*aleft;
delete(str1,1,k);
val(str1,atop,k);
if (str1<>'') and (str1[1]='-') then atop:=-1*atop;
delete(str1,1,k);
val(str1,awidth,k);
delete(str1,1,k);
val(str1,aheight,k);
delete(str1,1,k);
val(str1,k1,k);
delete(str1,1,k);
k:=pos(',',str1);
atop:=atop+(dispno-Ftpcount+1)*height;
if k>0 then str1:=copy(str1,1,k-1);
if (str1<>'') and fileexists(str1) then
begin
pic:=Tpicture.Create;
pic.LoadFromFile(str1);
if k1=1 then
begin
str1:=inttostr(pic.width*Fscale);
SetCells(3,i,str1);
awidth:=pic.width*Fscale;
str1:=inttostr(pic.height*Fscale);
SetCells(4,i,str1);
aheight:=pic.height*Fscale;
bmp.Canvas.Draw(aleft,atop, pic.Bitmap);
end
else
bmp.Canvas.StretchDraw(rect(aleft,atop,awidth+aleft,aheight+atop), Pic.Graphic);
pic.Free;
end;
if (Fplay=false) and (Fselectbmpno=i) and (Fselectbmpno>=0) then
begin
readselectdot(Fselectbmpno);
for j:=1 to 8 do
begin
bmp.Canvas.Brush.Color:=$7f7f7f+bmp.Canvas.Pixels[selectdotx[j]+3,selectdoty[j]+3];
bmp.Canvas.FillRect(rect(selectdotx[j],selectdoty[j],selectdotx[j]+5,selectdoty[j]+5));
end;
end;
end;
end;
end;
end;
procedure Tmyedit.readdot(pageno:integer);
var
str1:string;
i,j,k,k1,x,y,kh,kw,yoff,yy:integer;
kx,ky:integer;
kk:longint;
kct:longint;
mcolor,kcolor,fcolor:longint;
pic:Tpicture;
bmpdot:Tbitmap;
begin
bmpdot:=Tbitmap.Create;
bmpdot.Width:=width;
bmpdot.Height:=height;
bmpdot.Canvas.Brush.Color:=color;
bmpdot.Canvas.FillRect(rect(0,0,bmpdot.Width,bmpdot.Height));
bmpdot.Canvas.Font:=Font;
bmpdot.Canvas.Brush.Color:=color;
bmpdot.Canvas.CopyMode:=cmSrcPaint;
kk:=0;
if pageno>0 then
begin
i:=0;
while (tpstr[i].no<pageno) and (i<totalline) do
begin
kk:=kk+tpstr[i].linebyte;
i:=i+1;
end;
y:=0;
j:=i;
x:=1;
while (tpstr[j].no=pageno) and (j<totalline) do
begin
y:=y+tpstr[j].lineheight;
j:=j+1;
x:=x+1;
end;
yy:=(height div Fscale -y) div x;
y:=yy;
while (tpstr[i].no=pageno) and (i<totalline) do
begin
j:=0;
x:=0;
while(j<tpstr[i].linebyte) do
begin
str1:=Ftxt[kk+1];
k:=1;
if str1[1]>#$80 then
begin
str1:=str1+Ftxt[kk+2];
k:=2;
end;
kh:=((4*tpdata[kk].fontsize+1) div 3);
kw:=k*kh div 2;
k1:=tpdata[kk].extra div $10;
if (k1=0) or (k1>6) then
begin
myfont.lfHeight:=kh;
myfont.lfWidth:=kh;
end
else if (k1=6) or (k1=5) then
begin
myfont.lfHeight:=kh-2;
myfont.lfWidth:=kh-2;
end
else if (k1=1) or (k1=2) then
begin
myfont.lfWidth:=kh;
myfont.lfHeight:=kh-1;
end
else if (k1=3) or (k1=4) then
begin
myfont.lfWidth:=kh-1;
myfont.lfHeight:=kh;
end;
if (tpdata[kk].fontstyle and $80)=0 then myfont.lfWeight:=400
else myfont.lfWeight:=700;
if (tpdata[kk].fontstyle and $40)=0 then myfont.lfItalic:=0
else myfont.lfItalic:=1;
if (tpdata[kk].fontstyle and $20)=0 then myfont.lfUnderline:=0
else myfont.lfUnderline:=1;
if (tpdata[kk].fontstyle and $10)=0 then myfont.lfStrikeOut:=0
else myfont.lfStrikeOut:=1;
sysfont.Handle:=CreateFontIndirect(myfont);
bmpdot.Canvas.font.Assign(SYSfont);
if tpdata[kk].fontname<=0 then tpdata[kk].fontname:=fontname.Count-1;
bmpdot.Canvas.Font.Name:=fontname.Strings[tpdata[kk].fontname];
if (tpdata[kk].color<0) or (tpdata[kk].color>2) then tpdata[kk].color:=0;
// bmpdot.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
if str1[1]>=#$20 then
begin
yoff:=(tpstr[i].lineheight-kh) div 2;
if yoff<0 then yoff:=0;
if (kw>0) and (kh>0) then
begin
bmptemp.Width:=2*kw;
bmptemp.Height:=kh;
bmptemp.Canvas.Brush.Color:=color;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.Canvas.Font:=bmpdot.Canvas.Font;
if (k1=6) then
begin
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(1,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=color;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(1,2,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(0,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmptemp.canvas.TextOut(2,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$ffffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(1,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=1 then
begin
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(0,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(0,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(0,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=2 then
begin
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(0,1,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(0,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(0,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=3 then
begin
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(0,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
bmptemp.canvas.TextOut(1,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=0;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=SCREENCOLOR[tpdata[kk].color];
bmptemp.canvas.TextOut(1,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
end
else if k1=4 then
begin
bmpdot.Canvas.CopyMode:=cmSrcPaint;
bmptemp.Canvas.Font.Color:=$ff*(tpdata[kk].extra and 1)+$ff00*(tpdata[kk].extra div 2 and 1);
bmptemp.canvas.TextOut(1,0,str1);
bmpdot.Canvas.Draw(x,y+yoff,bmptemp);
bmptemp.Canvas.Brush.Color:=$fffff;
bmptemp.Canvas.FillRect(Rect(0,0,bmptemp.Width,bmptemp.Height));
bmpdot.Canvas.CopyMode:=cmSrcAnd;
bmptemp.Canvas.Font.Color:=0;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -