예제 #1
0
 public static void drawString(
     SDKString _string,
     int x,
     int y,
     int anchor,
     SDKTextUtils.DrawRegionRoutineDelegate DrawRegionRoutine)
 {
     SDKTextUtils.drawSubString(_string, 0, _string.Length(), x, y, anchor, DrawRegionRoutine);
 }
예제 #2
0
 public static void drawSubString(
     SDKStringIM _string,
     int offset,
     int len,
     int x,
     int y,
     int anchor)
 {
     SDKTextUtils.drawSubString(_string.getEAString(), offset, len, x, y, anchor, new SDKTextUtils.DrawRegionRoutineDelegate(GlobalMembersSDKUtils.renderFunc));
 }
예제 #3
0
        public static void drawWrappedString(
            SDKString _string,
            short[] offsets,
            int startLine,
            int lineCount,
            int xConst,
            int yConst,
            int anchorConst,
            SDKTextUtils.DrawRegionRoutineDelegate DrawRegionRoutine)
        {
            int xConst1  = xConst;
            int yConst1  = yConst;
            int anchor   = anchorConst;
            int lineSize = SDKTextUtils.getLineSize();
            int num1     = 0;
            int num2     = 0;
            int num3     = 0;

            if ((anchor & 2) != 0)
            {
                num3 = (int)offsets[0] * lineSize - SDKTextUtils.s_currentFont.getLeading() >> 1;
            }
            else if ((anchor & 4) != 0)
            {
                num3    = (int)offsets[0] * lineSize - SDKTextUtils.s_currentFont.getLeading();
                anchor ^= 4;
            }
            switch (SDKTextUtils.s_currentFont.m_transLineDirection)
            {
            case 1:
                xConst1 -= num3;
                num1     = lineSize;
                break;

            case 2:
                yConst1 -= num3;
                num2     = lineSize;
                break;

            case 4:
                xConst1 += num3;
                num1     = -lineSize;
                break;

            default:
                yConst1 += num3;
                num2     = -lineSize;
                break;
            }
            int offset1 = (int)offsets[(int)offsets[0] + 2];

            for (int index = startLine; index < startLine + lineCount; ++index)
            {
                int offset2 = (int)offsets[index];
                int len     = (int)offsets[index + 1] - offset2;
                int num4    = (int)_string.charCodeAt((int)offsets[index + 1] - 1);
                if (num4 == offset1 || num4 == 32)
                {
                    --len;
                }
                SDKTextUtils.drawSubString(_string, offset2, len, xConst1, yConst1, anchor, DrawRegionRoutine);
                xConst1 += num1;
                yConst1 += num2;
            }
        }