/// <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; }
/// <summary> /// Where on the template an asset should be drawn. /// </summary> /// <param name="position">X,Y co-ordinate</param> public new Image TopLeft(Position position) { base.TopLeft(position); return this; }
/// <summary> /// Where on the template an asset should be drawn. /// </summary> /// <param name="coord">X,Y co-ordinate</param> public new QRCode TopLeft(Position coord) { base.TopLeft(coord); return this; }
/// <summary> /// Where on the template an asset should be drawn. /// </summary> /// <param name="coord">X,Y co-ordinate</param> public Position TopLeft(Position coord) { this._ID = coord._ID; this.X = coord.X; this.Y = coord.Y; return this; }
/// <summary> /// Copy constructor: Initialises this object from the copy /// </summary> /// <param name="copy">Object to make a copy from</param> public Position(Position copy) { this.Canvas = copy.Canvas; this._ID = copy._ID; this.X = copy.X; this.Y = copy.Y; }
/// <summary> /// Where on the template an asset should be drawn. /// </summary> /// <param name="xy">X,Y co-ordinate</param> public new Caption TopLeft(Position xy) { this.TopLeft( xy.X, xy.Y ); return this; }