コード例 #1
0
        public bool TypeFast(ref GBuffer gbDest, ref IPoint ipDest, string sText, int iGlyphType)
        {
            bool   bGood = true;
            IPoint ipDestNow;

            try {
                ipDestNow   = new IPoint();
                ipDestNow.X = ipDest.X;
                ipDestNow.Y = ipDest.Y;
                char[] carrText = sText.ToCharArray();
                for (int i = 0; i < carrText.Length; i++)
                {
                    animarrGlyphType[iGlyphType].GotoFrame((long)carrText[i]);
                    if (!GBuffer.OverlayNoClipToBigCopyAlpha(ref gbDest, ref ipDestNow, ref animarrGlyphType[iGlyphType].gbFrame, ref gradNow))
                    {
                        bGood = false;
                        RReporting.ShowErr("failed to overlay text character#" + ((long)carrText[i]).ToString(), "TypeFast");
                    }
                    ipDestNow.X += animarrGlyphType[iGlyphType].gbFrame.iWidth;
                }
            }
            catch (Exception exn) {
                RReporting.ShowExn(exn, "TypeFast(...,\"" + sText + "\")");
                bGood = false;
            }
            return(bGood);
        }
コード例 #2
0
 //public void ShowAsciiTable(int xAt, int yAt) {
 //	ShowAsciiTable(Manager.gbScreenStatic, xAt, yAt);
 //}
 public void ShowAsciiTable(GBuffer gbDest, int xAt, int yAt)
 {
     try {
         IPoint ipAt  = new IPoint(xAt, yAt);
         int    lChar = 0;
         for (int yChar = 0; yChar < 16; yChar++)
         {
             ipAt.X = xAt;
             for (int xChar = 0; xChar < 16; xChar++)
             {
                 animarrGlyphType[GFont.GlyphTypeNormal].GotoFrame(lChar);
                 GBuffer.OverlayNoClipToBigCopyAlpha(ref gbDest, ref ipAt, ref animarrGlyphType[GFont.GlyphTypeNormal].gbFrame);
                 //GBuffer.RawOverlayNoClipToBig(ref RetroEngine.gbScreenMain, ref ipAt,
                 //                              ref animarrGlyphType[GFont.GlyphTypeNormal].gbFrame.byarrData,
                 //                              animarrGlyphType[GFont.GlyphTypeNormal].gbFrame.iWidth,
                 //                              animarrGlyphType[GFont.GlyphTypeNormal].gbFrame.iHeight, 1);
                 ipAt.X += animarrGlyphType[GFont.GlyphTypeNormal].gbFrame.iWidth;
                 lChar++;
             }
             ipAt.Y += animarrGlyphType[GFont.GlyphTypeNormal].gbFrame.iHeight;
         }
     }
     catch (Exception exn) {
         RReporting.ShowExn(exn, "GFont ShowAsciiTable");
     }
 }
コード例 #3
0
 public bool DrawFrameOverlay(ref GBuffer gbDest, ref IPoint ipDest)
 {
     return(GBuffer.OverlayNoClipToBigCopyAlpha(ref gbDest, ref ipDest, ref gbFrame));
 }