Esempio n. 1
0
        /// <summary>
        /// Specifies where we're going to draw on top of the template, what we're going to
        /// say and with which fonts, colours, decoration, etc.
        /// </summary>
        protected override void RegisterAreasOfInterest()
        {
            // Setup the position of each asset (if they've not been specified outside the class)
            Area mapCaptionRect = new Area(this.GDI, "#mapCaption", 1715, 1520, 650, 120);
            Position qrCodePosition = new Position(this.GDI,"#qrCode", 1704, 1800);
            Position qRCaptionPosition = new Position(this.GDI,"#qrCaption", 1704, 2000);

            // Add caption on to the polaroid
            Typeface mapCaptionFont = new Typeface("Bradley Hand ITC")
                .Bold(true)
                .Italic(true)
                .FontColour("#000000")
                .FontSize(35)
            ;

            Typeface gameDetailFont = new Typeface()
                .FontColour("#252525")
                .FontSize(50)
            ;
            Typeface gameLinkFont = new Typeface(gameDetailFont)
                .Underline(true)
                .FontColour("#cc0000")
            ;

            Caption mapCaption =
                new Caption(base.GDI, "#mapCaption", this.Venue)
                .Typeface(mapCaptionFont)
                .HorizontalAlignment(StringAlignment.Near)
                .Rect(mapCaptionRect)
            ;

            // Add the Quick Response code
            QRCode qrCode =
                new QRCode(base.GDI, "#qrCode", this.SignUpLink)
                .TopLeft(qrCodePosition)
                .Data(this.SignUpLink)
                .Scale(20)
                .Version(4)
            ;

            // add instructions
            Caption where = new Caption(base.GDI, "#where")
                .Text(this.Venue)
                .Rect(200, 1000, 1400, 300)
                .Typeface(gameDetailFont)
            ;
            Caption when = new Caption(base.GDI, "#when")
                .Text(this.Frequency)
                .Rect(200, 1500, 1400, 300)
                .Typeface(gameDetailFont)
            ;
            Caption howSignUp = new Caption(base.GDI, "#how")
                .Text("Join the game with the QR code, or at the website below:")
                .Rect(200, 2000, 1400, 300)
                .Typeface(gameDetailFont)
            ;
            Caption howLink = new Caption(base.GDI, "#how")
                .Text(this.SignUpLink)
                .Rect(200, 2200, 1400, 300)
                .Typeface(gameLinkFont)
            ;

            List<Position> areas = new List<Position>();

            areas.Add( where );
            areas.Add( when );
            areas.Add( howSignUp );
            areas.Add( howLink );

            areas.Add( this.VenueMap );
            areas.Add( mapCaption );
            areas.Add( qrCode );

            // Now we've defined all our instructions for what to draw, tell the PosterBuilder
            base.AreasOfInterest = areas;
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="gdi">Graphics object used to draw the template, shared between all drawing objects</param>
 /// <param name="id">A unique reference to the object being constructed.  This isn't really required, 
 /// but useful when debugging as the id is output when the guides are active so you can see which id corresponds
 /// to which box being drawn.
 /// </param>
 /// <param name="rect">Rectangle where the asset is to be placed on the template.</param>
 public Area(Graphics gdi, string id, Area rect)
     : base(gdi, id)
 {
     this._ID = id;
     this.Rect(rect);
 }
Esempio n. 3
0
 /// <summary>
 /// Copy constructor: Initialises this object from the copy
 /// </summary>
 /// <param name="copy">Object to make a copy from</param>
 public Area(Area copy)
     : base(copy)
 {
     this.Width = copy.Width;
     this.Height = copy.Height;
 }
Esempio n. 4
0
 /// <summary>
 /// Specifies where the area is to be placed on the template.
 /// </summary>
 /// <param name="rect">Rectangle where the asset is to be placed on the template.</param>
 public Area Rect(Area rect)
 {
     this.Rect(rect.X, rect.Y, rect.Width, rect.Height);
     return this;
 }
Esempio n. 5
0
 /// <summary>
 /// Specifies where the area is to be placed on the template.
 /// </summary>
 /// <param name="rect">Rectangle where the asset is to be placed on the template.</param>
 public new Caption Rect(Area rect)
 {
     base.Rect(rect);
     return this;
 }