<commit_before>--[[
/***************************************************************************************************************
*
*  PROJECT:     dxGUI
*  LICENSE:     See LICENSE in the top level directory
*  FILE:        dxGetter.lua
*  PURPOSE:     All shared getter functions.
*  DEVELOPERS:  Skyline <<EMAIL>>
*
*  dxGUI is available from http://community.mtasa.com/index.php?p=resources&s=details&id=4871
*
****************************************************************************************************************/
]]

--[[!
	@param dxElement Es el componente
	@param relative Un valor booleano indicando si la posición que se devuelve es relativa al elemento padre.
	@return Devuelve la posición de un componente de interfaz 
]]
function dxGetPosition(dxElement,relative)
	if not dxElement then
		outputDebugString("dxGetPosition gets wrong parameters (dxElement[,relative=false]")
		return
	end
	local x,y = getElementData(dxElement,"x"),getElementData(dxElement,"y")
	local tx,ty = getElementData(dxElement,"Title:x"),getElementData(dxElement,"Title:y")
	local px,py = getElementData(getElementParent(dxElement),"width"),getElementData(getElementParent(dxElement),"height")
	if tx and ty then
		if relative then
			return x/px,y/py,tx/px,ty/py
		else
			return x,y,tx,ty
		end
	else
		if relative then
			return x/px,y/py
		else
			return x,y
		end
	end
end

]]

--[[!
	@param dxElement Es el componente
	@param relative Un valor booleano indicando si las dimensiones que se devuelven son relativas al elemento padre.
	@return Devuelve las dimensiones de un componente de interfaz
]]
function dxGetSize(dxElement,relative)
	if not dxElement then
		outputDebugString("dxGetSize gets wrong parameters (dxElement[,relative=false]")
		return
	end
	local w,h = getElementData(dxElement,"width"),getElementData(dxElement,"height")
	local px,py = getElementData(getElementParent(dxElement),"width"),getElementData(getElementParent(dxElement),"height")
	if relative then
		return w/px,h/py
	else
		return w,h
	end<commit_msg>Eliminada errata del código<commit_after>--[[
/***************************************************************************************************************
*
*  PROJECT:     dxGUI
*  LICENSE:     See LICENSE in the top level directory
*  FILE:        dxGetter.lua
*  PURPOSE:     All shared getter functions.
*  DEVELOPERS:  Skyline <<EMAIL>>
*
*  dxGUI is available from http://community.mtasa.com/index.php?p=resources&s=details&id=4871
*
****************************************************************************************************************/
]]

--[[!
	@param dxElement Es el componente
	@param relative Un valor booleano indicando si la posición que se devuelve es relativa al elemento padre.
	@return Devuelve la posición de un componente de interfaz 
]]
function dxGetPosition(dxElement,relative)
	if not dxElement then
		outputDebugString("dxGetPosition gets wrong parameters (dxElement[,relative=false]")
		return
	end
	local x,y = getElementData(dxElement,"x"),getElementData(dxElement,"y")
	local tx,ty = getElementData(dxElement,"Title:x"),getElementData(dxElement,"Title:y")
	local px,py = getElementData(getElementParent(dxElement),"width"),getElementData(getElementParent(dxElement),"height")
	if tx and ty then
		if relative then
			return x/px,y/py,tx/px,ty/py
		else
			return x,y,tx,ty
		end
	else
		if relative then
			return x/px,y/py
		else
			return x,y
		end
	end
end


--[[!
	@param dxElement Es el componente
	@param relative Un valor booleano indicando si las dimensiones que se devuelven son relativas al elemento padre.
	@return Devuelve las dimensiones de un componente de interfaz
]]
function dxGetSize(dxElement,relative)
	if not dxElement then
		outputDebugString("dxGetSize gets wrong parameters (dxElement[,relative=false]")
		return
	end
	local w,h = getElementData(dxElement,"width"),getElementData(dxElement,"height")
	local px,py = getElementData(getElementParent(dxElement),"width"),getElementData(getElementParent(dxElement),"height")
	if relative then
		return w/px,h/py
	else
		return w,h
	end
{'fraction_non_alphanumeric': 0.199265605875153, 'fraction_numerical': 0.0019583843329253367, 'mean_word_length': 5.821368948247079, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5479260', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1204, 'n_words': 330}