HomeSort by relevance Sort by last modified time
    Searched refs:desired_aspect (Results 1 - 5 of 5) sorted by null

  /external/chromium_org/ui/gfx/image/
image_family.cc 49 float desired_aspect; local
51 desired_aspect = 1.0f;
55 desired_aspect = static_cast<float>(width) / height;
57 DCHECK_GT(desired_aspect, 0.0f);
59 float closest_aspect = GetClosestAspect(desired_aspect);
63 int desired_width = closest_aspect <= desired_aspect ?
70 float ImageFamily::GetClosestAspect(float desired_aspect) const {
71 // Find the two aspect ratios on either side of |desired_aspect|.
73 map_.lower_bound(MapKey(desired_aspect, 0));
76 greater_or_equal->first.aspect() == desired_aspect) {
    [all...]
image_family.h 140 // Find the closest aspect ratio in the map to |desired_aspect|.
142 // |map_| must not be empty. |desired_aspect| must be > 0.0.
143 float GetClosestAspect(float desired_aspect) const;
  /external/chromium_org/chrome/browser/thumbnails/
simple_thumbnail_crop.cc 144 float desired_aspect = local
160 if (src_aspect > desired_aspect) {
163 int new_width = static_cast<int>(source_size.height() * desired_aspect);
169 } else if (src_aspect < desired_aspect) {
171 gfx::Rect(source_size.width(), source_size.width() / desired_aspect);
content_analysis.cc 485 float desired_aspect = local
490 float aspect_change_delta = std::abs(computed_aspect - desired_aspect);
496 (computed_aspect / desired_aspect > kAspectRatioToleranceFactor ||
497 desired_aspect / computed_aspect > kAspectRatioToleranceFactor)) {
505 if (computed_aspect / desired_aspect > kAspectRatioToleranceFactor) {
514 static_cast<int>(computed_width / desired_aspect + 0.5f));
525 static_cast<int>(computed_width / desired_aspect + 0.5f));
530 new_computed_width = desired_aspect * computed_height + 0.5f;
539 static_cast<int>(desired_aspect * computed_height + 0.5f));
548 static_cast<int>(desired_aspect * computed_height + 0.5f))
    [all...]
simple_thumbnail_crop_unittest.cc 148 float desired_aspect = local
165 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);
177 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);
189 EXPECT_NEAR(desired_aspect, clip_aspect, 0.01);

Completed in 166 milliseconds