English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 10 January 2022, 12:59   #1
bork
Registered User
 
Join Date: Jan 2021
Location: Birmingham, UK
Posts: 9
Why does my Intuition screen not clip height?

I'm setting up a custom Intuition screen with a size larger than the required standard lo-res display size, as I want to scroll a little for extra content.

No matter if I declare the SA_Overscan as OSCAN_TEXT or pass a configured clip rect via SA_DClip, the screen does not clip height when scrolling, yet clips width as expected.

Here is the setup code:

Code:
	

#define DISPLAY_WIDTH (320)
#define DISPLAY_HEIGHT (256)

#define SCREEN_WIDTH (512)
#define SCREEN_HEIGHT (512)

...

struct Rectangle clipRect = {
	.MinX = 0,
	.MaxX = DISPLAY_WIDTH - 1,
	.MinY = 0,
	.MaxY = DISPLAY_HEIGHT - 1
};

_system.screen = OpenScreenTags(NULL,
	SA_Type, CUSTOMSCREEN,
	SA_Width, SCREEN_WIDTH,
	SA_Height, SCREEN_HEIGHT,
	SA_Depth, DISPLAY_DEPTH,
	SA_Quiet, TRUE,
	SA_ShowTitle, FALSE,
	//SA_Overscan, OSCAN_TEXT,
	SA_DClip, (ULONG)&clipRect,
	TAG_END 
);
Any ideas?
bork is offline  
Old 13 January 2022, 21:39   #2
bork
Registered User
 
Join Date: Jan 2021
Location: Birmingham, UK
Posts: 9
For future reference I have found a solution:

Instead of using the OpenScreen function's width and height to describe and allocate a bitmap for the larger screen area, then attempting to use the clip rect to keep it confined to the display area, I instead allocated the screen bitmap via AllocBitmap and passed it to the screen via SA_BitMap tag with width and height set to the display dimensions. This method allows scrolling of the larger screen area in both axes to be correctly clipped.
bork is offline  
Old 14 January 2022, 19:30   #3
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi and thanks!
tygre is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cookie-cut blit into an interleaved Intuition screen thyslo Coders. Asm / Hardware 9 07 February 2021 08:43
Intuition-v45 Blank Screen? abbub support.Apps 15 08 October 2020 06:00
Seamless transition from Intuition Screen to View arcanist Coders. General 2 24 February 2019 17:28
max height in lores Asman Coders. Asm / Hardware 17 02 October 2014 20:14
D-Box A1200 not enough height? Bamiga2002 support.Hardware 20 07 January 2012 16:29

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:47.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06493 seconds with 15 queries