/foundation/arkui/ace_engine/frameworks/core/components_ng/property/ |
D | layout_constraint.inl | 18 void LayoutConstraintT<T>::ApplyAspectRatio(float ratio, const std::optional<CalcSize>& calcSize) argument 20 if (!Positive(ratio)) { 21 // just in case ratio is illegal value 22 LOGD("Aspect ratio value is not positive"); 36 selfIdealSize.SetHeight(selfIdealSize.Width().value() / ratio); 38 minSize.SetHeight(minSize.Width() / ratio); 39 maxSize.SetHeight(maxSize.Width() / ratio); 40 ApplyAspectRatioToParentIdealSize(true, ratio); 44 selfIdealSize.SetWidth(selfIdealSize.Height().value() * ratio); 46 minSize.SetWidth(minSize.Height() * ratio); [all …]
|
D | layout_constraint.h | 37 void ApplyAspectRatio(float ratio, const std::optional<CalcSize>& calcSize); 39 void ApplyAspectRatioToParentIdealSize(bool useWidth, float ratio); 41 void ApplyAspectRatioByMaxSize(float ratio, std::optional<bool> useDefinedWidth); 43 void ApplyAspectRatioWithCalcSize(float ratio, bool useDefinedWidth); 45 void ApplyAspectRatioWithoutCalcSize(float ratio);
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/image/ |
D | image_modifier.cpp | 94 float ratio = 1.0f; in DrawImageWithAnimation() local 97 ratio = abs((imageFit_->Get() - static_cast<float>(startImageFit_)) / difference); in DrawImageWithAnimation() 99 UpdatePaintConfig(ratio); in DrawImageWithAnimation() 102 canvas->SetIsDrawAnimate(!NearEqual(ANIMATION_END, ratio, EPSILON)); in DrawImageWithAnimation() 115 void ImageModifier::UpdatePaintConfig(float ratio) in UpdatePaintConfig() argument 121 if (NearEqual(ANIMATION_END, ratio, EPSILON)) { in UpdatePaintConfig() 126 auto x = startDstRect_.GetX() + (endDstRect_.GetX() - startDstRect_.GetX()) * ratio; in UpdatePaintConfig() 127 auto y = startDstRect_.GetY() + (endDstRect_.GetY() - startDstRect_.GetY()) * ratio; in UpdatePaintConfig() 137 x = endSrcRect_.GetX() * ratio + in UpdatePaintConfig() 138 (startSrcRect_.GetX() / (startImageWidth / endImageWidth)) * (ANIMATION_END - ratio); in UpdatePaintConfig() [all …]
|
/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/render/ |
D | rs_material_filter_test.cpp | 49 float ratio = 1.0; variable 50 RSMaterialFilter rsMaterialFilter(style, dipScale, mode, ratio); 54 auto rsMaterialFilter2 = RSMaterialFilter(style, dipScale, mode, ratio); 67 float ratio = 1.0f; variable 70 RSMaterialFilter rsMaterialFilter = RSMaterialFilter(style, dipScale, mode, ratio); 76 auto rsMaterialFilter2 = std::make_shared<RSMaterialFilter>(style, dipScale, mode, ratio);
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/toggle/ |
D | switch_layout_algorithm.cpp | 59 auto ratio = switchTheme->GetRatio(); in MeasureContent() local 60 if ((frameWidth / frameHeight) < ratio) { in MeasureContent() 62 height = width / ratio; in MeasureContent() 63 } else if ((frameWidth / frameHeight) > ratio) { in MeasureContent() 65 width = height * ratio; in MeasureContent()
|
/foundation/arkui/ace_engine/frameworks/core/components/checkable/ |
D | rosen_render_checkbox.cpp | 387 double ratio = DEFAULT_MIN_CHECKBOX_SHAPE_SCALE; in DrawAnimationOffToOn() local 389 ratio = shapeScale_ / CHECK_MARK_LEFT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 390 … path.lineTo(originX + start.GetX() + deltaX * ratio, originY + start.GetY() + deltaY * ratio); in DrawAnimationOffToOn() 403 … ratio = (shapeScale_ - CHECK_MARK_LEFT_ANIMATION_PERCENT) / CHECK_MARK_RIGHT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 404 … path.lineTo(originX + middle.GetX() + deltaX * ratio, originY + middle.GetY() - deltaY * ratio); in DrawAnimationOffToOn() 411 double ratio = DEFAULT_MIN_CHECKBOX_SHAPE_SCALE; in DrawAnimationOffToOn() local 413 ratio = shapeScale_ / CHECK_MARK_LEFT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 414 … path.LineTo(originX + start.GetX() + deltaX * ratio, originY + start.GetY() + deltaY * ratio); in DrawAnimationOffToOn() 433 … ratio = (shapeScale_ - CHECK_MARK_LEFT_ANIMATION_PERCENT) / CHECK_MARK_RIGHT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 434 … path.LineTo(originX + middle.GetX() + deltaX * ratio, originY + middle.GetY() - deltaY * ratio); in DrawAnimationOffToOn() [all …]
|
D | flutter_render_checkbox.cpp | 245 double ratio = DEFAULT_MIN_CHECKBOX_SHAPE_SCALE; in DrawAnimationOffToOn() local 247 ratio = shapeScale_ / CHECK_MARK_LEFT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 248 … path->lineTo(originX + start.GetX() + deltaX * ratio, originY + start.GetY() + deltaY * ratio); in DrawAnimationOffToOn() 261 … ratio = (shapeScale_ - CHECK_MARK_LEFT_ANIMATION_PERCENT) / CHECK_MARK_RIGHT_ANIMATION_PERCENT; in DrawAnimationOffToOn() 262 … path->lineTo(originX + middle.GetX() + deltaX * ratio, originY + middle.GetY() - deltaY * ratio); in DrawAnimationOffToOn() 292 double ratio = DEFAULT_MAX_CHECKBOX_SHAPE_SCALE - shapeScale_; in DrawAnimationOnToOff() local 293 path->moveTo(originX + start.GetX() + deltaX * ratio, originY + start.GetY() + deltaY * ratio); in DrawAnimationOnToOff() 296 … path->lineTo(originX + middle.GetX() + deltaX * ratio, originY + middle.GetY() - deltaY * ratio); in DrawAnimationOnToOff() 299 … path->moveTo(originX + middle.GetX() + deltaX * ratio, originY + middle.GetY() - deltaY * ratio); in DrawAnimationOnToOff() 302 path->lineTo(originX + end.GetX() - deltaX * ratio, originY + end.GetY() + deltaY * ratio); in DrawAnimationOnToOff()
|
D | flutter_render_switch.cpp | 163 double ratio = (currentPointOriginX_ - pointPadding * 2.0) / width; in DrawTrackOffAndOn() local 165 double trackStartX = originX + pointPadding - (trackStartDelta * ratio); in DrawTrackOffAndOn() 166 double trackEnd = (rawPointSize_.Width() + pointOriginX) + pointPadding * ratio; in DrawTrackOffAndOn() 169 double trackStartY = pointOriginY - (pointPadding * ratio); in DrawTrackOffAndOn() 171 …kStartX, trackStartY, trackEnd, rawPointSize_.Height() + pointOriginY + trackHeightDelta * ratio }, in DrawTrackOffAndOn() 172 pointRadius_ + radiusDelta * ratio, pointRadius_ + radiusDelta * ratio); in DrawTrackOffAndOn()
|
D | rosen_render_switch.cpp | 289 double ratio = (currentPointOriginX_ - pointPadding * 2.0) / width; in DrawTrackOffAndOn() local 291 double trackStartX = originX + pointPadding - (trackStartDelta * ratio); in DrawTrackOffAndOn() 292 double trackEnd = (rawPointSize_.Width() + pointOriginX) + pointPadding * ratio; in DrawTrackOffAndOn() 295 double trackStartY = pointOriginY - (pointPadding * ratio); in DrawTrackOffAndOn() 298 …kStartX, trackStartY, trackEnd, rawPointSize_.Height() + pointOriginY + trackHeightDelta * ratio }, in DrawTrackOffAndOn() 299 pointRadius_ + radiusDelta * ratio, pointRadius_ + radiusDelta * ratio); in DrawTrackOffAndOn() 305 …ckStartX, trackStartY, trackEnd, rawPointSize_.Height() + pointOriginY + trackHeightDelta * ratio), in DrawTrackOffAndOn() 306 pointRadius_ + radiusDelta * ratio, pointRadius_ + radiusDelta * ratio); in DrawTrackOffAndOn()
|
/foundation/arkui/ace_engine/frameworks/core/components/track/ |
D | render_track.h | 98 void SetTotalRatio(const double ratio) in SetTotalRatio() argument 101 totalRatio_ = ratio; in SetTotalRatio() 102 } else if (!NearEqual(ratio, prevousPercentValue_)) { in SetTotalRatio() 104 percentChange_ = ratio - prevousPercentValue_; in SetTotalRatio() 105 prevousPercentValue_ = ratio; in SetTotalRatio() 116 void SetCachedRatio(const double ratio) in SetCachedRatio() argument 118 cachedRatio_ = ratio; in SetCachedRatio()
|
/foundation/bundlemanager/distributed_bundle_framework/services/dbms/src/ |
D | image_compress.cpp | 162 double ratio = CalculateRatio(fileSize, imageType); in CompressImageByContent() local 163 if (ratio == FILE_SIZE_ERR) { in CompressImageByContent() 164 APP_LOGE("CalculateRatio failed: ratio is %{public}f", ratio); in CompressImageByContent() 167 APP_LOGD("ratio is %{public}f", ratio); in CompressImageByContent() 168 pixMap->scale(ratio, ratio); in CompressImageByContent()
|
/foundation/multimedia/histreamer/engine/plugin/plugins/source/http_source/http/ |
D | http_media_downloader.cpp | 171 double ratio = (static_cast<double>(bufferSize)) / RING_BUFFER_SIZE; in SaveData() local 175 MEDIA_LOG_I("Send http aboveWaterline event, ringbuffer ratio " PUBLIC_LOG_F, ratio); in SaveData() 177 callback_->OnEvent({PluginEventType::ABOVE_LOW_WATERLINE, {ratio}, "http"}); in SaveData() 182 MEDIA_LOG_I("Send http belowWaterline event, ringbuffer ratio " PUBLIC_LOG_F, ratio); in SaveData() 184 callback_->OnEvent({PluginEventType::BELOW_LOW_WATERLINE, {ratio}, "http"}); in SaveData()
|
/foundation/graphic/graphic_2d/rosen/modules/hyper_graphic_manager/core/frame_rate_manager/ |
D | hgm_frame_rate_manager.cpp | 120 float ratio = currRatio; in GetDrawingFrameRate() local 138 if (currRatio < ratio) { in GetDrawingFrameRate() 139 ratio = currRatio; in GetDrawingFrameRate() 153 if (currRatio < ratio) { in GetDrawingFrameRate() 154 ratio = currRatio; in GetDrawingFrameRate()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/render/ |
D | rs_material_filter.cpp | 62 RSMaterialFilter::RSMaterialFilter(int style, float dipScale, BLUR_COLOR_MODE mode, float ratio) in RSMaterialFilter() argument 69 … = RSMaterialFilter::CreateMaterialStyle(static_cast<MATERIAL_BLUR_STYLE>(style), dipScale, ratio); in RSMaterialFilter() 76 hash_ = SkOpts::hash(&ratio, sizeof(ratio), hash_); in RSMaterialFilter() 197 …lter> RSMaterialFilter::CreateMaterialStyle(MATERIAL_BLUR_STYLE style, float dipScale, float ratio) in CreateMaterialStyle() argument 200 MATERIAL_BLUR_STYLE style, float dipScale, float ratio) in CreateMaterialStyle() 206 maskColor_.MultiplyAlpha(ratio); in CreateMaterialStyle() 207 radius_ = RSMaterialFilter::RadiusVp2Sigma(materialParam.radius, dipScale) * ratio; in CreateMaterialStyle() 208 saturation_ = (materialParam.saturation - 1) * ratio + 1.0; in CreateMaterialStyle() 209 brightness_ = (materialParam.brightness - 1) * ratio + 1.0; in CreateMaterialStyle()
|
D | rs_filter.cpp | 41 …ilter> RSFilter::CreateMaterialFilter(int style, float dipScale, BLUR_COLOR_MODE mode, float ratio) in CreateMaterialFilter() argument 43 return std::make_shared<RSMaterialFilter>(style, dipScale, mode, ratio); in CreateMaterialFilter()
|
D | rs_image.cpp | 95 float ratio = srcW / srcH; local 107 dstW = std::max(frameW, frameH * ratio); 108 dstH = std::max(frameH, frameW / ratio); 111 dstH = frameW / ratio; 114 dstW = frameH * ratio; 121 dstW = std::min(frameW, frameH * ratio); 122 dstH = std::min(frameH, frameW / ratio); 127 dstW = std::min(frameW, frameH * ratio); 128 dstH = std::min(frameH, frameW / ratio);
|
/foundation/arkui/ui_lite/frameworks/components/ |
D | ui_image_view.cpp | 272 float ratio = 1.0f; in AdjustScaleAndTranslate() local 275 ratio = MATH_MAX(scale.x_, scale.y_); in AdjustScaleAndTranslate() 278 ratio = MATH_MIN(scale.x_, scale.y_); in AdjustScaleAndTranslate() 283 ratio = MATH_MIN(scale.x_, scale.y_); in AdjustScaleAndTranslate() 284 ratio = MATH_MIN(ratio, 1.0f); in AdjustScaleAndTranslate() 291 if (scale.x_ != ratio) { in AdjustScaleAndTranslate() 292 scale.x_ = ratio; in AdjustScaleAndTranslate() 294 …translate.x_ += (static_cast<float>(widgetWidth) - static_cast<float>(imageWidth_) * ratio) * 0.5f; in AdjustScaleAndTranslate() 296 if (scale.y_ != ratio) { in AdjustScaleAndTranslate() 297 scale.y_ = ratio; in AdjustScaleAndTranslate() [all …]
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/recording/ |
D | adaptive_image_helper.cpp | 44 float ratio = srcW / srcH; in GetDstRect() local 57 dstW = std::max(frameW, frameH * ratio); in GetDstRect() 58 dstH = std::max(frameH, frameW / ratio); in GetDstRect() 61 dstH = frameW / ratio; in GetDstRect() 64 dstW = frameH * ratio; in GetDstRect() 71 dstW = std::min(frameW, frameH * ratio); in GetDstRect() 72 dstH = std::min(frameH, frameW / ratio); in GetDstRect() 77 dstW = std::min(frameW, frameH * ratio); in GetDstRect() 78 dstH = std::min(frameH, frameW / ratio); in GetDstRect()
|
/foundation/arkui/ace_engine/frameworks/core/components/progress/ |
D | loading_progress_component.h | 65 void SetMoveRatio(double ratio) in SetMoveRatio() argument 67 moveRatio_ = ratio; in SetMoveRatio()
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/include/render/ |
D | rs_material_filter.h | 72 RSMaterialFilter(int style, float dipScale, BLUR_COLOR_MODE mode, float ratio); 116 … sk_sp<SkImageFilter> CreateMaterialStyle(MATERIAL_BLUR_STYLE style, float dipScale, float ratio); 119 …<Drawing::ImageFilter> CreateMaterialStyle(MATERIAL_BLUR_STYLE style, float dipScale, float ratio);
|
/foundation/window/window_manager/window_scene/test/mock/ |
D | mock_session.h | 49 MOCK_METHOD1(SetAspectRatio, WSError(float ratio)); 50 MOCK_METHOD1(ResetAspectRatio, WSError(float ratio));
|
/foundation/resourceschedule/ffrt/benchmarks/serial_sched_time/ |
D | plot.py | 59 ratio = (current_avg - base_avg) / base_avg 65 round(ratio * 100, 2)), '%]']), fontsize=15)
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/loading_progress/ |
D | loading_progress_modifier.cpp | 427 auto ratio = CorrectNormalize(refreshFollowRatio); in ChangeRefreshFollowData() local 428 sizeScale_->Set(std::sqrt(TWO) * HALF + (1.0 - std::sqrt(TWO) * HALF) * ratio); in ChangeRefreshFollowData() 433 date_->Set(FOLLOW_START + FOLLOW_SPAN * ratio); in ChangeRefreshFollowData() 441 auto ratio = originData; in CorrectNormalize() local 442 if (ratio < 0.0f) { in CorrectNormalize() 443 ratio = 0.0f; in CorrectNormalize() 445 if (ratio > 1.0f) { in CorrectNormalize() 446 ratio = 1.0f; in CorrectNormalize() 448 return ratio; in CorrectNormalize()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/gauge/ |
D | gauge_paint_method.cpp | 107 float ratio = 0.0f; in Paint() local 116 ratio = (value - min) / (max - min); in Paint() 122 if (ShouldHighLight(totalWeight - currentStart, weights[index], ratio * totalWeight)) { in Paint() 136 data.sweepDegree = sweepDegree * ratio; in Paint()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/refresh/ |
D | refresh_pattern.h | 129 void UpdateLoadingProgress(int32_t state, float ratio); 144 void UpdateCustomBuilderProperty(RefreshState state, float ratio);
|