(a) Discuss the concept of colour keying and how it works with SDL graphics surfaces. (1) Describe briefly colour keying

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(a) Discuss the concept of colour keying and how it works with SDL graphics surfaces. (1) Describe briefly colour keying

Post by answerhappygod »

A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 1
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 1 (15.02 KiB) Viewed 68 times
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 2
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 2 (26.23 KiB) Viewed 68 times
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 3
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 3 (16.9 KiB) Viewed 68 times
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 4
A Discuss The Concept Of Colour Keying And How It Works With Sdl Graphics Surfaces 1 Describe Briefly Colour Keying 4 (13.38 KiB) Viewed 68 times
(a) Discuss the concept of colour keying and how it works with SDL graphics surfaces. (1) Describe briefly colour keying and explain its purpose. (6 marks) (11) Consider the statement SDL_SetColorKey( loadedSurface, SDL_TRUE, SDL_MapRGB( loadedSurface->format, 0, 0xFF, OxFF)); The SDL_SetColorkey () function has three arguments. State the data type and the use of each argument. (9 marks)

(6) Appraise the use of SDL program for graphical application Figure 461) shows a sprite sheet containing a filled circle. Figure Q4(b)) Listing 0466)1) shows the SDL statements that are responsible for extracting the four quadrants of the circle. gSpriteclips[0].y = 0; gSpriteclips[@].h = 50; gSpriteclips[1].y = @; gSpriteclips[1].h = 50; // Set top left sprite gSpriteclips[@].x = 0; Espriteclips[@].w = 50; // Set top right sprite gSpriteclips[1].x = 50; gSpriteclips[1].w = 50; // Set bottom left sprite gSpriteclips[2].x = 0; eSpriteclips[2].w = 50; // Set bottom right sprite Spriteclips[3].x = 50; gSpriteclips(3).W = 50; gSpriteclips[2].y = 50; gSpriteclips[2].h = 50; gSpriteclips [3].y = 50; gSpriteclips[3].h = 50; Listing Q4(b)(i)

Listing 0466)(1) shows the SDL statements that are responsible for producing the output as shown in Figure 046) (11). for (int i = 0; i < 4; i++) { gSpriteSheetTexture.renderſi * 120, e, &gspriteclips[@]); [0 gSpriteSheetTexture.renderſi * 120 + 60, e, &gSpriteclips[1]); + , ]) gSpriteSheetTexture.renderſi * 120, 60, &gSpriteclips[2]); gSpriteSheetTexture.render(i + 120 + 60, 60, 8gspriteclips[3]); } Listing 04b) (ii) SOL Tutorial Figure Q4(b)(ii)

Write three additional for loops containing SDL statements that will produce the output as shown in Figure 046b)(111). SOLT NL LA KI Figure (4(b)(iii) (15 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply