/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/utils/ |
H A D | point.h | 115 y_ += p.y_; 122 y_ -= p.y_; 145 return PointF(p1.x_ + p2.x_, p1.y_ + p2.y_); 150 return PointF(p1.x_ - p2.x_, p1.y_ - p2.y_); 261 y_ += p.y_; 268 y_ -= p.y_; 275 y_ = static_cast<int64_t>(y_ * scale); 285 y_ = static_cast<int>(y_ / divisor); 291 return PointI(p1.x_ + p2.x_, p1.y_ + p2.y_); 329 return p1.x_ == p2.x_ && p1.y_ == p2.y_; [all …]
|
H A D | point3.h | 58 scalar y_; variable 75 return y_; in GetY() 90 y_ = y; in SetY() 101 y_ += p.y_; 109 y_ -= p.y_; 117 y_ = static_cast<int64_t>(y_ * scale); 128 y_ = static_cast<int>(y_ / divisor); 135 return Point3(p1.x_ + p1.y_, p2.x_ + p2.y_, p1.z_ + p2.z_); 140 return Point3(p1.x_ - p2.x_, p1.y_ - p2.y_, p1.z_ - p2.z_); 165 return Point3(p.x_, p.y_, p.z_); [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/base/geometry/ng/ |
H A D | offset_t.h | 49 y_ = 0; in Reset() 59 return y_; in GetY() 75 T dy = y_ - offset.y_; in GetDistance() 86 y_ = y; in SetY() 96 y_ += y; in AddY() 101 return OffsetT(x_ + offset.x_, y_ + offset.y_); 106 return OffsetT(x_ - offset.x_, y_ - offset.y_); 125 y_ += offset.y_; 132 y_ -= offset.y_; 138 return NearEqual(x_, offset.x_) && NearEqual(y_, offset.y_); [all …]
|
H A D | radius.h | 28 Radius(const Dimension& x, const Dimension& y) : x_(x), y_(y) {} in Radius() 33 return x_.IsValid() && y_.IsValid(); in IsValid() 38 return x_.IsValid() || y_.IsValid(); in HasValue() 48 return y_; in GetY() 60 y_ = Dimension(y); in SetY() 65 return Radius(x_ + radius.x_, y_ + radius.y_); 70 return Radius(x_ - radius.x_, y_ - radius.y_); 75 return (radius.x_ == x_) && (radius.y_ == y_); 80 return (radius.x_ != x_) || (radius.y_ != y_); 86 y_ = radius.y_; [all …]
|
H A D | point_t.h | 29 PointT(T x, T y) : x_(x), y_(y) {} in PointT() 38 return y_; in GetY() 48 y_ = y; in SetY() 53 …T x = (x_ - center.GetX()) * std::cos(angle) - (y_ - center.GetY()) * std::sin(angle) + center.Get… in Rotate() 56 y_ = y; in Rotate() 61 return PointT(x_ - offset.GetX(), y_ - offset.GetY()); 66 return PointT(x_ + offset.GetX(), y_ + offset.GetY()); 71 return OffsetF(x_ - PointT.x_, y_ - PointT.y_); 76 return NearEqual(x_, PointT.x_) && NearEqual(y_, PointT.y_); 88 ss << "Point (" << std::fixed << std::setprecision(precision) << x_ << ", " << y_ << ")"; in ToString() [all …]
|
H A D | rect_t.h | 58 y_ = 0; in Reset() 66 y_ = y; in SetRect() 80 y_ *= scale; in ApplyScale() 88 y_ = round(y_ * scale); in ApplyScaleAndRound() 100 return GreatNotEqual(height_, 0) ? y_ : y_ + height_; in Top() 110 return GreatNotEqual(height_, 0) ? y_ + height_ : y_; in Bottom() 120 return y_; in GetY() 167 y_ = top; in SetTop() 246 y_ += rect.y_; 255 y_ -= rect.y_; [all …]
|
/ohos5.0/foundation/graphic/graphic_utils_lite/frameworks/ |
H A D | geometry2d.cpp | 27 int32_t den = static_cast<int32_t>(aA.x_ - aB.x_) * (bA.y_ - bB.y_) - in Intersect() 28 static_cast<int32_t>(aA.y_ - aB.y_) * (bA.x_ - bB.x_); in Intersect() 34 …t32_t yNum = (static_cast<int32_t>(aA.x_) * aB.y_ - static_cast<int32_t>(aA.y_) * aB.x_) * (bA.y_ … in Intersect() 35 … (aA.y_ - aB.y_) * (static_cast<int32_t>(bA.x_) * bB.y_ - static_cast<int32_t>(bA.y_) * bB.x_); in Intersect() 37 out.y_ = yNum / den; in Intersect() 49 int32_t iPos = static_cast<int32_t>(aB.x_ - aA.x_) * (bA.y_ - aA.y_) - in IsIntersect() 50 static_cast<int32_t>(aB.y_ - aA.y_) * (bA.x_ - aA.x_); in IsIntersect() 51 int32_t kPos = static_cast<int32_t>(aB.x_ - aA.x_) * (bB.y_ - aA.y_) - in IsIntersect() 52 static_cast<int32_t>(aB.y_ - aA.y_) * (bB.x_ - aA.x_); in IsIntersect() 103 newPoly[newVertexNum].y_ = intersectPoint.y_; in Clip() [all …]
|
H A D | transform.cpp | 72 …t c = (static_cast<int32_t>(polygon_[j].x_ - polygon_[i].x_) * (polygon_[k].y_ - polygon_[j].y_)) - in GetClockWise() 73 … (static_cast<int32_t>(polygon_[j].y_ - polygon_[i].y_) * (polygon_[k].x_ - polygon_[j].x_)); in GetClockWise() 99 Scale(Vector3<float>(scale.x_, scale.y_, 1.0f), Vector3<float>(pivot.x_, pivot.y_, 0)); in Scale() 126 Rotate(angle, Vector3<float>(pivot.x_, pivot.y_, 0), Vector3<float>(pivot.x_, pivot.y_, 1.0f)); in Rotate() 198 float y = rectY + cameraPosition_.y_; in GetOrigPoint() 307 if (imgPoint4.y_ < COORD_MIN) { in SetMatrix() 308 polygon_[i].y_ = COORD_MIN; in SetMatrix() 310 polygon_[i].y_ = COORD_MAX; in SetMatrix() 312 polygon_[i].y_ = MATH_ROUND(imgPoint4.y_); in SetMatrix() 345 int16_t yt = point.y_ - pivot.y_; in Rotate() [all …]
|
/ohos5.0/foundation/window/window_manager/utils/include/ |
H A D | wm_math.h | 89 float x_, y_; member 99 return Vector2 { a.x_ + b.x_, a.y_ + b.y_ }; 103 return Vector2 { a.x_ - b.x_, a.y_ - b.y_ }; 107 return (x_ * x_ + y_ * y_); in LengthSq() 116 float x_, y_, z_; member 126 return Vector3 { a.x_ + b.x_, a.y_ + b.y_, a.z_ + b.z_ }; 130 return Vector3 { a.x_ - b.x_, a.y_ - b.y_, a.z_ - b.z_ }; 152 return (x_ * x_ + y_ * y_ + z_ * z_); in LengthSq() 175 return (a.x_ * b.x_ + a.y_ * b.y_ + a.z_ * b.z_); in Dot() 180 temp.x_ = a.y_ * b.z_ - a.z_ * b.y_; in Cross() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/common/properties/ |
H A D | radius.h | 39 y_.SetContextAndCallback(context, callback); in SetContextAndCallback() 45 y_.SetValue(round(y_.Value() * scale)); in ApplyScaleAndRound() 50 return x_.IsValid() && y_.IsValid(); in IsValid() 55 return x_.IsValid() || y_.IsValid(); in HasValue() 65 return y_; in GetY() 75 y_ = AnimatableDimension(y, option); 85 y_ = y; in SetY() 90 return Radius(x_ + radius.GetX(), y_ + radius.GetY()); 95 return Radius(x_ - radius.GetX(), y_ - radius.GetY()); 100 return Radius(x_ * scale, y_ * scale); [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/base/geometry/ |
H A D | quaternion.h | 35 return y_; in GetY() 51 y_ = y; in SetY() 65 auto y = this->y_ + q.y_; 73 auto x = w_ * q.x_ + x_ * q.w_ + y_ * q.z_ - z_ * q.y_; 74 auto y = w_ * q.y_ - x_ * q.z_ + y_ * q.w_ + z_ * q.x_; 75 auto z = w_ * q.z_ + x_ * q.y_ - y_ * q.x_ + z_ * q.w_; 76 auto w = w_ * q.w_ - x_ * q.x_ - y_ * q.y_ - z_ * q.z_; 82 return NearEqual(x_, q.x_) && NearEqual(y_, q.y_) 93 return { -x_, -y_, -z_, w_ }; in inverse() 98 return { -x_, -y_, -z_, -w_ }; in flip() [all …]
|
H A D | point.h | 30 Point(double x, double y) : x_(x), y_(y) {} in Point() 31 Point(double x, double y, SourceType sourceType) : x_(x), y_(y), sourceType_(sourceType) {} in Point() 34 : x_(x), y_(y), screenX_(screenX), screenY_(screenY), sourceType_(sourceType) in Point() 44 return y_; in GetY() 54 y_ = y; in SetY() 92 y_ = y; in Rotate() 97 return Point(x_ - offset.GetX(), y_ - offset.GetY()); 102 return Point(x_ + offset.GetX(), y_ + offset.GetY()); 107 return Offset(x_ - point.x_, y_ - point.y_); 112 return NearEqual(x_, point.x_) && NearEqual(y_, point.y_); [all …]
|
H A D | rect.h | 46 y_ = y; in SetRect() 60 y_ *= scale; in ApplyScale() 68 y_ = round(y_ * scale.Height()); in ApplyScaleAndRound() 80 return GreatNotEqual(height_, 0.0) ? y_ : y_ + height_; in Top() 90 return GreatNotEqual(height_, 0.0) ? y_ + height_ : y_; in Bottom() 117 y_ = offset.GetY(); in SetOffset() 122 return Offset(x_, y_); in GetOffset() 132 y_ = top; in SetTop() 176 y_ += offset.GetY(); 183 y_ -= offset.GetY(); [all …]
|
H A D | vec3.h | 31 y_ = AnimatableFloat(y, option); 37 y_ = y; in Vec3() 49 y_.SetContextAndCallback(context, std::forward<RenderNodeAnimationCallback>(callback)); in SetContextAndCallbacks() 60 return y_.GetValue(); in GetY() 80 y_ = AnimatableFloat(y); in SetY() 91 && NearEqual(y_.GetValue(), vec.y_.GetValue()) 104 y_ = AnimatableFloat(newValue.GetY(), animationOption_); 111 AnimatableFloat y_; variable
|
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/animation/ |
H A D | rs_particle_noise_field.cpp | 28 … (point.y_ >= fieldCenter_.y_ - height * HALF) && (point.y_ < fieldCenter_.y_ + height * HALF)); in IsPointInField() 31 double normY = (point.y_ - fieldCenter_.y_) * (point.y_ - fieldCenter_.y_); in IsPointInField() 41 if (ROSEN_EQ(direction.x_, 0.f) && ROSEN_EQ(direction.y_, 0.f)) { in CalculateDistanceToRectangleEdge() 47 float top = center.y_ - size.y_ * HALF; in CalculateDistanceToRectangleEdge() 48 float bottom = center.y_ + size.y_ * HALF; in CalculateDistanceToRectangleEdge() 52 float tTop = ROSEN_EQ(direction.y_, 0.f) ? -1.f : (top - position.y_) / direction.y_; in CalculateDistanceToRectangleEdge() 53 float tBottom = ROSEN_EQ(direction.y_, 0.f) ? -1.f : (bottom - position.y_) / direction.y_; in CalculateDistanceToRectangleEdge() 96 fieldSize_.x_ = std::min(fieldSize_.x_, fieldSize_.y_); in ApplyField() 97 fieldSize_.y_ = fieldSize_.x_; in ApplyField() 123 return noise.Curl(position.x_, position.y_) * noiseScale_; in ApplyCurlNoise() [all …]
|
/ohos5.0/foundation/graphic/graphic_utils_lite/interfaces/kits/gfx_utils/ |
H A D | graphic_math.h | 143 sum += y_ * other.y_; in Dot() 156 return x_ * other.y_ - y_ * other.x_; in Cross() 166 return Vector2(x_ - other.x_, y_ - other.y_); 181 return (x_ == other.x_) && (y_ == other.y_); 187 y_ = other.y_; 194 y_ += other.y_; 201 y_ -= other.y_; 206 T y_; variable 595 rData[7] = fixed.y_ * (1 - scale.y_); in Scale() 876 (pivot2.y_ - pivot1.y_) * (pivot2.y_ - pivot1.y_) + in Rotate() [all …]
|
H A D | geometry2d.h | 86 vertex_[0].y_ = y1; in Line() 88 vertex_[1].y_ = y2; in Line() 155 vertexes_[0].y_ = rect.GetTop(); in Polygon() 158 vertexes_[1].y_ = rect.GetTop(); in Polygon() 161 vertexes_[2].y_ = rect.GetBottom(); in Polygon() 164 vertexes_[3].y_ = rect.GetBottom(); in Polygon() 236 vertexes_[0].y_ = rect.GetTop(); 239 vertexes_[1].y_ = rect.GetTop(); 242 vertexes_[2].y_ = rect.GetBottom(); 245 vertexes_[3].y_ = rect.GetBottom();
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/shape/ |
H A D | shape_view_box.h | 36 return y_; in Top() 56 y_ = top; in SetTop() 76 y_ = shapeViewBox.y_; 84 … return (x_ == shapeViewBox.x_) && (y_ == shapeViewBox.y_) && (width_ == shapeViewBox.width_) && 90 … return (x_ != shapeViewBox.x_) || (y_ != shapeViewBox.y_) || (width_ != shapeViewBox.width_) || 96 Dimension y_ = Dimension(-1.0); variable
|
/ohos5.0/foundation/window/window_manager/utils/src/ |
H A D | wm_math.cpp | 212 { trans.x_, trans.y_, 1.0f }, in CreateTranslation() 270 { trans.x_, trans.y_, trans.z_, 1.0f }, in CreateTranslation() 281 trans.y_ = -Vector3::Dot(yaxis, eye); in CreateLookAt() 286 { xaxis.y_, yaxis.y_, zaxis.y_, 0.0f }, in CreateLookAt() 288 { trans.x_, trans.y_, trans.z_, 1.0f } in CreateLookAt() 297 { camera.x_, camera.y_, 0.0f, 1.0f }, in CreatePerspective() 307 retVal.y_ = vec.x_ * mat.mat_[0][1] + vec.y_ * mat.mat_[1][1] + mat.mat_[2][1]; // 2: row2 in Transform() 317 retVal.y_ = vec.x_ * mat.mat_[0][1] + vec.y_ * mat.mat_[1][1] + in Transform() 330 retVal.y_ = vec.x_ * mat.mat_[0][1] + vec.y_ * mat.mat_[1][1] + in TransformWithPerspDiv() 350 Vector3 screenPoint(p.x_, p.y_, 0.1f); in GetOriginScreenPoint() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/test/mock/core/rosen/ |
H A D | testing_point3.h | 25 TestingPoint3(const TestingPoint3& point) : x_(point.x_), y_(point.y_), z_(point.z_) {} in TestingPoint3() 27 TestingPoint3(float xP, float yP, float zP) : x_(xP), y_(yP), z_(zP) {} in TestingPoint3() 36 return y_; in GetY() 51 y_ = yP; in SetY() 61 float y_ = 0.0f; variable
|
H A D | testing_point.h | 25 TestingPoint(const TestingPoint& point) : x_(point.x_), y_(point.y_) {} in TestingPoint() 27 TestingPoint(float xP, float yP) : x_(xP), y_(yP) {} in TestingPoint() 36 return y_; in GetY() 46 y_ = yP; in SetY() 76 float y_; variable
|
/ohos5.0/foundation/graphic/graphic_3d/3d_widget_adapter/include/data_type/ |
H A D | quaternion.h | 26 Quaternion(float x, float y, float z, float w) : x_(x), y_(y), z_(z), w_(w) {} in Quaternion() 33 return y_; in GetY() 49 y_ = y; in SetY() 61 return (x_ == other.x_) && (y_ == other.y_) && (z_ == other.z_) && (w_ == other.w_); 68 float y_; member
|
H A D | vec3.h | 26 Vec3(float x, float y, float z) : x_(x), y_(y), z_(z) {} in Vec3() 28 float GetY() const { return y_; } in GetY() 31 void SetY(float y) { y_ = y; } in SetY() 38 float y_ = 0.0f; member
|
/ohos5.0/foundation/graphic/graphic_utils_lite/test/ |
H A D | geometry2d_unit_test.cpp | 52 EXPECT_EQ(line->operator[](0).y_, TWOFOLD_VALUE); 54 EXPECT_EQ(line->operator[](1).y_, FOURFOLD_VALUE); 72 EXPECT_EQ(line->operator[](0).y_, TWOFOLD_VALUE); 74 EXPECT_EQ(line->operator[](1).y_, FOURFOLD_VALUE); 161 EXPECT_EQ(polygon->operator[](2).y_, FIVEFOLD_VALUE); 182 EXPECT_EQ(polygon->operator[](i++).y_, TWOFOLD_VALUE); 184 EXPECT_EQ(polygon->operator[](i++).y_, TWOFOLD_VALUE); 186 EXPECT_EQ(polygon->operator[](i++).y_, FOURFOLD_VALUE); 230 EXPECT_EQ(out.y_, TWOFOLD_VALUE); 304 EXPECT_EQ(polygon->operator[](i++).y_, BASE_VALUE); [all …]
|
/ohos5.0/base/security/security_component_manager/services/security_component_service/sa/sa_main/ |
H A D | sec_comp_info_helper.cpp | 45 comp->rect_.y_ = comp->windowRect_.y_ + (comp->rect_.y_ - comp->windowRect_.y_) * scale; in AdjustSecCompRect() 48 comp->rect_.x_, comp->rect_.y_, comp->rect_.width_, comp->rect_.height_); in AdjustSecCompRect() 113 if (GreatNotEqual(ZERO_OFFSET, rect.x_) || GreatNotEqual(ZERO_OFFSET, rect.y_) || in CheckRectValid() 114 GreatNotEqual(rect.x_, curScreenWidth) || GreatNotEqual(rect.y_, curScreenHeight)) { in CheckRectValid() 120 GreatOrEqual((rect.y_ + rect.height_), curScreenHeight)) { in CheckRectValid() 125 if (GreatNotEqual(windowRect.x_, rect.x_) || GreatNotEqual(windowRect.y_, rect.y_) || in CheckRectValid() 127 GreatNotEqual(rect.y_ + rect.height_, windowRect.y_ + windowRect.height_)) { in CheckRectValid()
|