public void Main()
        {
            string solDir = TestUtils.getSolutionDirectory();

            string file1 = solDir + TestConstants.IMAGE_DIR + Constants.defaultImages[1];
            string file2 = solDir + TestConstants.IMAGE_DIR + Constants.defaultImages[2];

            GraphicsWrapper gw       = new GraphicsWrapper();
            Graphics        graphics = gw.graphics;

            Assert.NotNull(graphics);

            ImageIntrinsicState imageIntrinsicState1 = new ImageIntrinsicState(file1);
            ImageIntrinsicState imageIntrinsicState2 = new ImageIntrinsicState(file2);

            Assert.IsTrue(imageIntrinsicState1 < imageIntrinsicState2 == imageIntrinsicState1);
            Assert.IsTrue(imageIntrinsicState1 > imageIntrinsicState2 == imageIntrinsicState2);
        }
Beispiel #2
0
        public void Main()
        {
            string solDir            = TestUtils.getSolutionDirectory();
            string file1             = solDir + TestConstants.IMAGE_DIR + Constants.defaultImages[0];
            ImageIntrinsicState img1 = ImagePool.getImage(file1);

            string file2             = solDir + TestConstants.IMAGE_DIR + Constants.defaultImages[1];
            ImageIntrinsicState img2 = ImagePool.getImage(file2);

            string file3             = solDir + TestConstants.IMAGE_DIR + Constants.defaultImages[2];
            ImageIntrinsicState img3 = new ImageIntrinsicState(file3);

            ImagePool.addImage(file3);

            Assert.AreEqual(ImagePool.getImage(file3).src, img3.src);

            Assert.AreEqual(img1, ImagePool.getImage(file1));
            Assert.AreEqual(img2, ImagePool.getImage(file2));
        }
        public override void ReadXml(XmlReader reader)
        {
            reader.ReadStartElement();

            string src = reader.ReadInnerXml();

            intrinsicState = new ImageIntrinsicState(src);

            Point p1 = new Point();

            p1.ReadXml(reader);
            point1 = p1;

            Point p2 = new Point();

            p2.ReadXml(reader);
            point2 = p2;

            reader.ReadEndElement();
        }
 public Picture(Rectangle rect, string fileName) : base(rect)
 {
     intrinsicState = ImagePool.getImage(fileName);
     //incrementKey();
 }