Пример #1
0
 public int sceFontFindFont(FontLibraryHandle libHandle, FontStyle* fontStyle, uint* errorCode)
 {
     throw(new NotImplementedException());
     /*
     *errorCode = 0;
     return 0;
     */
 }
Пример #2
0
 public int sceFontFindFont(FontLibraryHandle FontLibraryHandle, FontStyle* FontStylePointer, uint* ErrorCode)
 {
     var FontLibrary = FontLibraries.Get(FontLibraryHandle);
     var FontRegistry = FontLibrary.FontRegistryList.OrderByDescending(Entry => FontStyle.GetScoreCompare(Entry.FontStyle, *FontStylePointer)).First();
     var FontIndex = FontLibrary.FontRegistryList.IndexOf(FontRegistry);
     *ErrorCode = 0;
     return FontIndex;
 }
Пример #3
0
        public int sceFontFindFont(FontLibraryHandle libHandle, FontStyle *fontStyle, uint *errorCode)
        {
            throw(new NotImplementedException());

            /*
             * errorCode = 0;
             * return 0;
             */
        }
Пример #4
0
		public FontHandle sceFontOpenUserFile(FontLibraryHandle FontLibraryHandle, string FileName, int Mode, uint* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			var FontFileStream = HleIoManager.HleIoWrapper.Open(FileName, Vfs.HleIoFlags.Read, (Vfs.SceMode)Mode);
			var PGF = new PGF().Load(FontFileStream);
			var Font = new Font(FontLibrary, PGF);
			*ErrorCode = 0;
			return Fonts.Create(Font);
		}
Пример #5
0
		public FontHandle sceFontOpenUserMemory(FontLibraryHandle FontLibraryHandle, byte* MemoryFontAddress, int MemoryFontLength, uint* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			var MemoryFont = PointerUtils.PointerToByteArray(MemoryFontAddress, MemoryFontLength);
			var PGF = new PGF().Load(new MemoryStream(MemoryFont));
			var Font = new Font(FontLibrary, PGF);
			*ErrorCode = 0;
			return Fonts.Create(Font);
		}
Пример #6
0
 public int sceFontGetFontList(FontLibraryHandle FontLibraryHandle, FontStyle* FontStylesPointer, int MaximumNumberOfFontsToGet)
 {
     var FontLibrary = FontLibraries.Get(FontLibraryHandle);
     int NumberOfFontsReturned = Math.Min(MaximumNumberOfFontsToGet, FontLibrary.FontRegistryList.Count);
     for (int n = 0; n < NumberOfFontsReturned; n++)
     {
         FontStylesPointer[n] = FontLibrary.FontRegistryList[n].FontStyle;
     }
     return NumberOfFontsReturned;
 }
Пример #7
0
		//[HlePspNotImplemented]
		public FontHandle sceFontOpen(FontLibraryHandle FontLibraryHandle, int Index, int Mode, uint* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);

			var FontRegistry = FontLibrary.FontRegistryList[Index];
			var FontFileStream = HleIoManager.HleIoWrapper.Open("flash0:/font/" + FontRegistry.FontStyle.FileName, Vfs.HleIoFlags.Read, Vfs.SceMode.All);
			var PGF = new PGF().Load(FontFileStream);
			var Font = new Font(FontLibrary, PGF);
			*ErrorCode = 0;
			return Fonts.Create(Font);
		}
Пример #8
0
        public int sceFontFindOptimumFont(FontLibraryHandle libHandle, FontStyle *fontStyle, uint *errorCode)
        {
            return(0);
            //throw(new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * errorCode = 0;
             * return 1;
             */
        }
Пример #9
0
        public int sceFontGetFontList(FontLibraryHandle libHandle, FontStyle *fontStyles, int numFonts)
        {
            throw (new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * FontLibrary fontLibrary = uniqueIdFactory.get!FontLibrary(libHandle);
             * fontStyles[0..numFonts] = fontLibrary.fontStyles[0..numFonts];
             * return 0;
             */
        }
Пример #10
0
        public int sceFontGetNumFontList(FontLibraryHandle libHandle, uint *errorCode)
        {
            throw(new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * //throw(new NotImplementedException());
             * FontLibrary fontLibrary = uniqueIdFactory.get!FontLibrary(libHandle);
             * errorCode = 0;
             *
             * return fontLibrary.fontNames.length;
             */
        }
Пример #11
0
        public FontHandle sceFontOpenUserFile(FontLibraryHandle libHandle, string fileName, int mode, uint *errorCode)
        {
            throw(new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * errorCode = 0;
             *
             * return uniqueIdFactory.add(
             *      (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
             *              .setByFileName(fileName)
             * );
             */
        }
Пример #12
0
        public FontHandle sceFontOpenUserMemory(FontLibraryHandle libHandle, void *memoryFontAddr, int memoryFontLength, uint *errorCode)
        {
            throw (new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * errorCode = 0;
             *
             * return uniqueIdFactory.add(
             *      (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
             *              .setByData((cast(ubyte *)memoryFontAddr)[0..memoryFontLength])
             * );
             */
        }
Пример #13
0
        public FontHandle sceFontOpen(FontLibraryHandle libHandle, int index, int mode, uint *errorCode)
        {
            return((FontHandle)0);
            //throw (new NotImplementedException());

            /*
             * unimplemented_notice();
             *
             * errorCode = 0;
             *
             * return uniqueIdFactory.add(
             *      (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
             *              .setByIndex(index)
             * );
             */
        }
Пример #14
0
 public int sceFontDoneLib(FontLibraryHandle FontLibraryHandle)
 {
     FontLibraries.Remove((int)FontLibraryHandle);
     return(0);
 }
Пример #15
0
		public float sceFontPixelToPointV(FontLibraryHandle FontLibraryHandle, float FontPointsV, int* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			*ErrorCode = 0;
			return FontPointsV * PointDPI / FontLibrary.VerticalResolution;
		}
Пример #16
0
        public FontHandle sceFontOpen(FontLibraryHandle libHandle, int index, int mode, uint* errorCode)
        {
            return (FontHandle)0;
            //throw (new NotImplementedException());
            /*
            unimplemented_notice();

            *errorCode = 0;

            return uniqueIdFactory.add(
                (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
                    .setByIndex(index)
            );
            */
        }
Пример #17
0
		public int sceFontSetResolution(FontLibraryHandle FontLibraryHandle, float HorizontalResolution, float VerticalResolution)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			FontLibrary.HorizontalResolution = HorizontalResolution;
			FontLibrary.VerticalResolution = VerticalResolution;
			return 0;
		}
Пример #18
0
		public float sceFontPixelToPointH(FontLibraryHandle FontLibraryHandle, float FontPointsH, int* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			*ErrorCode = 0;
			return FontPointsH * PointDPI / FontLibrary.HorizontalResolution;
		}
Пример #19
0
		public int sceFontGetFontInfoByIndexNumber(FontLibraryHandle FontLibraryHandle, FontInfo* FontInfoPointer, int Unknown, int FontIndex)
		{
			throw (new NotImplementedException());
		}
Пример #20
0
		public int sceFontSetAltCharacterCode(FontLibraryHandle FontLibraryHandle, ushort CharCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			FontLibrary.AlternateCharCode = CharCode;
			return 0;
		}
Пример #21
0
 public int sceFontDoneLib(FontLibraryHandle FontLibraryHandle)
 {
     FontLibraries.Remove(FontLibraryHandle);
     return 0;
 }
Пример #22
0
		//[HlePspNotImplemented]
		public int sceFontFindOptimumFont(FontLibraryHandle FontLibraryHandle, FontStyle* FontStylePointer, uint* ErrorCode)
		{
			return sceFontFindFont(FontLibraryHandle, FontStylePointer, ErrorCode);
		}
Пример #23
0
        public FontHandle sceFontOpenUserFile(FontLibraryHandle libHandle, string fileName, int mode, uint* errorCode)
        {
            throw(new NotImplementedException());
            /*
            unimplemented_notice();

            *errorCode = 0;

            return uniqueIdFactory.add(
                (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
                    .setByFileName(fileName)
            );
            */
        }
Пример #24
0
        public FontHandle sceFontOpenUserMemory(FontLibraryHandle libHandle, void* memoryFontAddr, int memoryFontLength, uint* errorCode)
        {
            throw (new NotImplementedException());
            /*
            unimplemented_notice();

            *errorCode = 0;

            return uniqueIdFactory.add(
                (new Font(uniqueIdFactory.get!FontLibrary(libHandle)))
                    .setByData((cast(ubyte *)memoryFontAddr)[0..memoryFontLength])
            );
            */
        }
Пример #25
0
        public int sceFontFindOptimumFont(FontLibraryHandle libHandle, FontStyle* fontStyle, uint* errorCode)
        {
            return 0;
            //throw(new NotImplementedException());
            /*
            unimplemented_notice();

            *errorCode = 0;
            return 1;
            */
        }
Пример #26
0
        public int sceFontGetNumFontList(FontLibraryHandle libHandle, uint* errorCode)
        {
            throw(new NotImplementedException());
            /*
            unimplemented_notice();

            //throw(new NotImplementedException());
            FontLibrary fontLibrary = uniqueIdFactory.get!FontLibrary(libHandle);
            *errorCode = 0;

            return fontLibrary.fontNames.length;
            */
        }
Пример #27
0
 public int sceFontGetFontInfoByIndexNumber(FontLibraryHandle LibraryHandle, FontInfo *FontInfo, int Unknown, int FontIndex)
 {
     throw(new NotImplementedException());
 }
Пример #28
0
		public int sceFontGetNumFontList(FontLibraryHandle FontLibraryHandle, uint* ErrorCode)
		{
			var FontLibrary = FontLibraries.Get(FontLibraryHandle);
			*ErrorCode = 0;
			return FontLibrary.FontRegistryList.Count;
		}
Пример #29
0
        public int sceFontGetFontList(FontLibraryHandle libHandle, FontStyle* fontStyles, int numFonts)
        {
            throw (new NotImplementedException());
            /*
            unimplemented_notice();

            FontLibrary fontLibrary = uniqueIdFactory.get!FontLibrary(libHandle);
            fontStyles[0..numFonts] = fontLibrary.fontStyles[0..numFonts];
            return 0;
            */
        }