<commit_before>#include "../base/SRC_FIRST.hpp"
#include "overlay_element.hpp"

namespace graphics
{
  OverlayElement::~OverlayElement()
  {}

  OverlayElement::Params::Params()
    : m_pivot(0, 0),
      m_position(EPosAboveRight),
      m_depth(maxDepth),
      m_userInfo()
  {}

  OverlayElement::OverlayElement(Params const & p)
    : m_pivot(p.m_pivot),
      m_position(p.m_position),
      m_depth(p.m_depth),
      m_isNeedRedraw(true),
      m_isFrozen(false),
      m_isVisible(true),
      m_isValid(true),
      m_isDirtyRect(true),
      m_isDirtyLayout(true),
      m_isDirtyRoughRect(true),
      m_userInfo(p.m_userInfo)
  {}

  m2::PointD const OverlayElement::computeTopLeft(m2::PointD const & sz,
                                                  m2::PointD const & pv,
                                                  EPosition pos)
  {
    m2::PointD res;

    if (pos & EPosLeft)
      res.x = pv.x - sz.x;
    else if (pos & EPosRight)
      res.x = pv.x;
    else
      res.x = pv.x - sz.x / 2;<commit_msg>default value for OverlayElement was made zero.<commit_after>#include "../base/SRC_FIRST.hpp"
#include "overlay_element.hpp"

namespace graphics
{
  OverlayElement::~OverlayElement()
  {}

  OverlayElement::Params::Params()
    : m_pivot(0, 0),
      m_position(EPosAboveRight),
      m_depth(0),
      m_userInfo()
  {}

  OverlayElement::OverlayElement(Params const & p)
    : m_pivot(p.m_pivot),
      m_position(p.m_position),
      m_depth(p.m_depth),
      m_isNeedRedraw(true),
      m_isFrozen(false),
      m_isVisible(true),
      m_isValid(true),
      m_isDirtyRect(true),
      m_isDirtyLayout(true),
      m_isDirtyRoughRect(true),
      m_userInfo(p.m_userInfo)
  {}

  m2::PointD const OverlayElement::computeTopLeft(m2::PointD const & sz,
                                                  m2::PointD const & pv,
                                                  EPosition pos)
  {
    m2::PointD res;

    if (pos & EPosLeft)
      res.x = pv.x - sz.x;
    else if (pos & EPosRight)
      res.x = pv.x;
    else
      res.x = pv.x - sz.x / 2;
{'fraction_non_alphanumeric': 0.12386417981826878, 'fraction_numerical': 0.007173601147776184, 'mean_word_length': 2.0855457227138645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1754767', 'n_tokens_mistral': 750, 'n_tokens_neox': 740, 'n_words': 117}