import { colorToRgba , overrideOpacity } from '../../../../../common/color_library_wrappers' ; import { Color } from '../../../../../common/colors' ; import { Fill } from '../../../../../geoms/types' ; import { ColorVariant , getColorFromVariant } from '../../../../../utils/common' ; import { GeometryStateStyle , AreaStyle } from '../../../../../utils/themes/theme' ; import { getTextureStyles } from '../../../utils/texture' ; internal export function buildAreaStyles ( ctx , imgCanvas , baseColor , themeAreaStyle , geometryStateStyle ) { const texture = getTextureStyles ( ctx , imgCanvas , baseColor , geometryStateStyle . opacity , themeAreaStyle . texture ) ; const color = overrideOpacity ( colorToRgba ( getColorFromVariant ( baseColor , themeAreaStyle . fill ) ) , ( opacity ) => opacity * geometryStateStyle . opacity * themeAreaStyle . opacity ) ; return { color , texture , } ; }