Beispiel #1
0
        public void drawFog(int x, int y, int w, int h)
        {
            sResolution res = cDataBase.pResolution.getResolution();

            int Xres = (int)res.Xres;
            int Yres = (int)res.Yres;

            f1 = new sGraphicRectangel(0, 0, (Int32)Xres, (Int32)y, true, (float)1.0, new sColor(200, Color.LightGray));
            f2 = new sGraphicRectangel(0, (Int32)y, (Int32)x, (Int32)h, true, (float)1.0, new sColor(200, Color.LightGray));
            f3 = new sGraphicRectangel((Int32)(x + w), (Int32)y, (Int32)((Xres - x - w) > 0 ? (Xres - x - w) : 0), (Int32)h, true, (float)1.0, new sColor(200, Color.LightGray));
            f4 = new sGraphicRectangel(0, (Int32)(y + h), (Int32)Xres, (Int32)((Yres - y - h) > 0 ? (Yres - y - h) : 0), true, (float)1.0, new sColor(200, Color.LightGray));
            pDrawList.Add(f1);
            pDrawList.Add(f2);
            pDrawList.Add(f3);
            pDrawList.Add(f4);
        }
Beispiel #2
0
        public void setup(cXMLHandler xmlhandler)
        {
            pXmlHandler = xmlhandler;

            sResolution resolution = cDataBase.pResolution.getResolution();


            if (resolution.Xres == 1280 && resolution.Yres == 720)
            {
                radioButton720.Checked = true;
            }
            else if (resolution.Xres == 1920 && resolution.Yres == 1080)
            {
                radioButton1080.Checked = true;
            }
        }
Beispiel #3
0
            public cDataBaseResolution(cXMLHandler XmlHandler)
            {
                string[] path = { /*"skin", */ "output" };
                resolutionNode = XmlHandler.XmlGetRootNodeElement(path);
                foreach (XmlNode myXmlNode in resolutionNode.ChildNodes)
                {
                    if (myXmlNode.NodeType != XmlNodeType.Element)
                    {
                        continue;
                    }

                    pResolution = new sResolution(
                        Convert.ToUInt32(myXmlNode.Attributes["xres"].Value),
                        Convert.ToUInt32(myXmlNode.Attributes["yres"].Value),
                        Convert.ToUInt32(myXmlNode.Attributes["bpp"].Value)
                        );
                }
            }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            sResolution res  = cDataBase.pResolution.getResolution();
            Size        nRes = new Size();;

            if (radioButton720.Checked)
            {
                nRes.Width  = 1280;
                nRes.Height = 720;
            }
            else if (radioButton1080.Checked)
            {
                nRes.Width  = 1920;
                nRes.Height = 1080;
            }

            cDataBase.pImage.rescale((int)res.Xres, (int)res.Yres, (int)nRes.Width, (int)nRes.Height);
            cDataBase.rescaleLocations(pXmlHandler, (int)res.Xres, (int)res.Yres, (int)nRes.Width, (int)nRes.Height);
            cDataBase.pResolution.setResolution((uint)nRes.Width, (uint)nRes.Height);

            this.Close();
        }