Skip to content

Commit

Permalink
Fix create marker issue caused by highdpi scaling problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiraYuukiAsuna committed Dec 20, 2024
1 parent 6e981ea commit 3cea413
Show file tree
Hide file tree
Showing 1,306 changed files with 304,400 additions and 25 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ CMakeFiles/*
#ignore MacOS system files
.DS_Store

#ignore lib files or header files in common_lib
v3d_main/common_lib/*

#ignore symlink folder
released_plugins_more

Expand All @@ -50,5 +47,5 @@ build_windows-*/

v3d_main/v3d_build/
v3d_main/build-*

build/
released_plugin_more/*
11 changes: 1 addition & 10 deletions v3d_main/3drenderer/renderer_hit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,18 +2540,9 @@ void Renderer_gl1::endSelectMode()
void Renderer_gl1::_appendMarkerPos(int x, int y)
{
MarkerPos pos;
#ifdef Q_OS_WIN
pos.x = x;
pos.y = y;
#endif
#ifdef Q_OS_LINUX
pos.x = 2 * x;
pos.y = 2 * y;
#endif
#ifdef Q_OS_MACX
pos.x = 2 * x;
pos.y = 2 * y;
#endif

pos.drawn = false;
for (int i=0; i<4; i++){
pos.view[i] = viewport[i];
Expand Down
72 changes: 72 additions & 0 deletions v3d_main/common_lib/include/boost/algorithm/is_clamped.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
Copyright (c) Ivan Matek, Marshall Clow 2021.
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/

/// \file is_clamped.hpp
/// \brief IsClamped algorithm
/// \authors Ivan Matek, Marshall Clow
///

#ifndef BOOST_ALGORITHM_IS_CLAMPED_HPP
#define BOOST_ALGORITHM_IS_CLAMPED_HPP

#include <functional> // for std::less
#include <cassert>

#include <boost/type_traits/type_identity.hpp> // for boost::type_identity

namespace boost { namespace algorithm {

/// \fn is_clamped ( T const& val,
/// typename boost::type_identity<T>::type const & lo,
/// typename boost::type_identity<T>::type const & hi, Pred p )
/// \returns true if value "val" is in the range [ lo, hi ]
/// using the comparison predicate p.
/// If p ( val, lo ) return false.
/// If p ( hi, val ) return false.
/// Otherwise, returns true.
///
/// \param val The value to be checked
/// \param lo The lower bound of the range
/// \param hi The upper bound of the range
/// \param p A predicate to use to compare the values.
/// p ( a, b ) returns a boolean.
///
template <typename T, typename Pred>
BOOST_CXX14_CONSTEXPR bool is_clamped(
T const& val, typename boost::type_identity<T>::type const& lo,
typename boost::type_identity<T>::type const& hi, Pred p) {
// assert ( !p ( hi, lo )); // Can't assert p ( lo, hi ) b/c they
// might be equal
return p(val, lo) ? false : p(hi, val) ? false : true;
}

/// \fn is_clamped ( T const& val,
/// typename boost::type_identity<T>::type const & lo,
/// typename boost::type_identity<T>::type const & hi)
/// \returns true if value "val" is in the range [ lo, hi ]
/// using operator < for comparison.
/// If the value is less than lo, return false.
/// If the value is greater than hi, return false.
/// Otherwise, returns true.
///
/// \param val The value to be checked
/// \param lo The lower bound of the range
/// \param hi The upper bound of the range
///

template<typename T>
BOOST_CXX14_CONSTEXPR bool is_clamped ( const T& val,
typename boost::type_identity<T>::type const & lo,
typename boost::type_identity<T>::type const & hi )
{
return boost::algorithm::is_clamped ( val, lo, hi, std::less<T>());
}

}}

#endif // BOOST_ALGORITHM_CLAMP_HPP
33 changes: 33 additions & 0 deletions v3d_main/common_lib/include/boost/any/detail/placeholder.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright Antony Polukhin, 2021-2024.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_ANY_ANYS_DETAIL_PLACEHOLDER_HPP
#define BOOST_ANY_ANYS_DETAIL_PLACEHOLDER_HPP

#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
#endif

#include <boost/type_index.hpp>

/// @cond
namespace boost {
namespace anys {
namespace detail {

class BOOST_SYMBOL_VISIBLE placeholder {
public:
virtual ~placeholder() {}
virtual const boost::typeindex::type_info& type() const noexcept = 0;
};

} // namespace detail
} // namespace anys
} // namespace boost
/// @endcond

#endif // #ifndef BOOST_ANY_ANYS_DETAIL_PLACEHOLDER_HPP
Loading

0 comments on commit 3cea413

Please sign in to comment.