COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 03-31-2018, 11:04 AM   #401
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 311
Default

No probs, glad to help!
Bobflip is offline   Reply With Quote
Old 04-10-2018, 05:44 PM   #402
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 333
Default

Have there been any changes that would impact text colors?

I am having this weird issue with font colors on the Mac. PC is fine. The mColor has the correct value, but something happens when it draws. So if I have the text set to Orange, it draws light blue. If I change it to Green, it draws as Magenta. Yellow = a white/gray color.

For some controls, I have been using the ycairo_show_text with a global font. That works fine. For some other controls, I am still using IGraphics:rawIText(). That is the method that is doing weird color things.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-11-2018, 02:12 PM   #403
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by random_id View Post
Have there been any changes that would impact text colors?

I am having this weird issue with font colors on the Mac. PC is fine. The mColor has the correct value, but something happens when it draws. So if I have the text set to Orange, it draws light blue. If I change it to Green, it draws as Magenta. Yellow = a white/gray color.

For some controls, I have been using the ycairo_show_text with a global font. That works fine. For some other controls, I am still using IGraphics:rawIText(). That is the method that is doing weird color things.
Yes, I have reverted back to the old version of the swell. That might mess the text drawing.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 04-11-2018, 02:16 PM   #404
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

I will check this out for the weekend.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 04-11-2018, 04:03 PM   #405
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 333
Default

Quote:
Originally Posted by Youlean View Post
I will check this out for the weekend.
OK. I didn't dig so deep with the debugging and diff. I will start looking.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-11-2018, 04:08 PM   #406
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by random_id View Post
OK. I didn't dig so deep with the debugging and diff. I will start looking.
This has something to do with swell text. Colors are mixed. I don't have now time to check.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 04-11-2018, 04:57 PM   #407
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 333
Default

I think I found the problem.
In swell-gdi.mm, line 205 is:
Code:
CGContextRef c=CGBitmapContextCreate(ALIGN_FBUF(buf),w,h,8,w*4,__GetDisplayColorSpace(), kCGImageAlphaNoneSkipFirst);
If I change it to:
Code:
CGContextRef c=CGBitmapContextCreate(ALIGN_FBUF(buf),w,h,8,w*4, __GetBitmapColorSpace(), kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host);
the color looks correct
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-13-2018, 03:59 PM   #408
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 333
Default

Quote:
Originally Posted by Youlean View Post
Yes, I have reverted back to the old version of the swell. That might mess the text drawing.
Just wondering what was happening with Swell to make you want to change to an older version.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-14-2018, 11:43 AM   #409
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Thanks. I will add this fix.

A new version of swell has some problems with studio one on mac, though I am still having crashes in studio one...
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 04-29-2018, 09:45 AM   #410
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 44
Default

How can I make it so the window cant be resized out of the bounds of the current monitor? Or make it so the plugin is resized to the max monitor width / height on load.

cuz I have 3 monitors -- and when the plugin is on the middle main monitor, and gets resized into the second monitor -- next time the plugin loads, it gets centered in the middle monitor, and the drag-arrow in the bottom right of the plugin is out of bounds and invisible on the bottom of the screen....

Wouldn't it make sense to have some sort of functionality controlling / preventing this behavior baked in?

EDIT : Oops. Doh. I just noticed a method called "SetWindowSizeLimits"....

EDIT 2 : It's not working the way I would've expected it too...assume screenHeight and screenWidth are 1080 and 960 here...

Quote:
int screenHeight, screenWidth;
GetDesktopResolution(screenWidth, screenHeight);
GetGUIResize()->SetWindowSizeLimits(0,
/* Min Width */ GUI_WIDTH / 2,
/* Min Height */ GUI_HEIGHT / 2,
/* Max Width */ screenWidth,
/* Max Height */ screenHeight
);

Last edited by Opcode 7; 04-29-2018 at 10:04 AM.
Opcode 7 is offline   Reply With Quote
Old 05-01-2018, 07:46 PM   #411
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by Opcode 7 View Post
How can I make it so the window cant be resized out of the bounds of the current monitor? Or make it so the plugin is resized to the max monitor width / height on load.

cuz I have 3 monitors -- and when the plugin is on the middle main monitor, and gets resized into the second monitor -- next time the plugin loads, it gets centered in the middle monitor, and the drag-arrow in the bottom right of the plugin is out of bounds and invisible on the bottom of the screen....

Wouldn't it make sense to have some sort of functionality controlling / preventing this behavior baked in?

EDIT : Oops. Doh. I just noticed a method called "SetWindowSizeLimits"....

EDIT 2 : It's not working the way I would've expected it too...assume screenHeight and screenWidth are 1080 and 960 here...
I have not figured this out completely. GetDesktopResolution will give you desktop resolution but so far I have not found a way to get plugin border size to compensate for that too.

SetWindowSizeLimits will just limit resizing, but when you switch monitors you should resize GUI yourself.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 06-13-2018, 09:05 PM   #412
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 44
Default

Question: My plugins has hundreds of parameters, distributed through many AutoGUI Tabs -- so the window resizing seems to be a bit sluggish and laggy.

Is there any variables anywhere that control the speed of the re-draw? I tried adjusting DRAW_FPS from 120 to 240, to no avail....

Thoughts?
Opcode 7 is offline   Reply With Quote
Old 06-14-2018, 08:34 AM   #413
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 311
Default

I noticed a little pause in between resizes, but after commenting all my resizing code it remained so figured it was just part of the process!

Are you resizing all your controls or just the visible ones? If the former you could put a switch case statement in there to only resize the controls for the current tab, and then when the user changes to a different tab resize those controls - maybe even put boolean variables in there to store whether or not that tab's controls match the window size.
Bobflip is offline   Reply With Quote
Old 06-14-2018, 09:41 AM   #414
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 333
Default

I had added some code to cut the framerate in half during resizing (when the corner is being dragged), and then setting it back to normal rate OnMouseUp(). Unfortunately, it didn't really do anything noticeable.

Are you on a Mac or PC? As Youlean has said, there are some weird things happening with the Windows timer that triggers graphics drawing. I don't know if this has anything to do with it.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old Yesterday, 08:35 PM   #415
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 44
Default

Thanks, good suggestion Bob! I traced the slow resizing performance to the "GetLayoutContainerIsHidden" call (when there's a tonnn of parameters!) Adding the following checks to ResizeControlRects() made my resizing snappy again!

Code:
		IControl* pControl = mGraphics->GetControl(i);
		if (pControl->IsHidden()) {
			continue;
		}

		int *isHidden = GetLayoutContainerIsHidden(current_view_mode, pControl);
		if (*isHidden) {
			continue;
		}
Opcode 7 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 -7. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.