Показать сообщение отдельно
Старый 28.11.2011, 23:08   #6
Dzirt
Элита
 
Аватар для Dzirt
 
Регистрация: 16.01.2008
Сообщений: 1,800
Написано 958 полезных сообщений
(для 3,833 пользователей)
Ответ: Скруглённые уголки на BlitzMax

Накатал ровно за 7 минут )

Много с чем еще не дружит,но с Cls уже подружил:

Strict
Graphics 800,600,0,60
SetBlend (alphablend)

SetClsColor 68,68,68 	

While Not KeyHit(key_escape)
Cls
	
	DrawRoundedRect(100,100,300,200,50)


Flip 
Wend
End



Function DrawRoundedRect(x,y,w,h,round)
	'get curent cls color for rounded corners
	Local GetClsR	
	Local GetClsG
	Local GetClsB
	GetClsColor (GetClsR,GetClsG,GetClsB)
	
	'get curent drawing color 
	Local GetR	
	Local GetG
	Local GetB
	GetColor (GetR,GetG,GetB)
	
	'Draw main rect body
	DrawRect x,y,w,h
	
	
	
	SetColor GetClsR,GetClsG,GetClsB
	'draw  corners
	DrawOval x-round/2,y-round/2,round,round
	DrawOval x-round/2,y+h-round/2,round,round
	
	DrawOval x+w-round/2,y-round/2,round,round
	DrawOval x+w-round/2,y+h-round/2,round,round
	
	SetColor GetR,GetG,GetB
	DrawOval x,y,round,round
	DrawOval x,y+h-round,round,round
	
	DrawOval x+w-round,y,round,round
	DrawOval x+w-round,y+h-round,round,round
	
End Function
(Offline)
 
Ответить с цитированием