2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/devel-api/images/atlas.h>
22 #include <dali/internal/event/images/atlas-impl.h>
23 #include <dali/internal/event/images/buffer-image-impl.h>
28 Atlas Atlas::New( SizeType width,
30 Pixel::Format pixelFormat,
33 DALI_ASSERT_ALWAYS( 0u != width && "Invalid Atlas width requested" );
34 DALI_ASSERT_ALWAYS( 0u != height && "Invalid Atlas height requested" );
36 return Atlas( Internal::Atlas::New( width, height, pixelFormat, recoverContext ) );
43 void Atlas::Clear( const Vector4& color )
45 GetImplementation( *this ).Clear( color );
48 bool Atlas::Upload( BufferImage bufferImage,
52 return GetImplementation(*this).Upload( GetImplementation(bufferImage), xOffset, yOffset );
55 bool Atlas::Upload( const std::string& url,
59 return GetImplementation(*this).Upload( url, xOffset, yOffset );
62 bool Atlas::Upload( PixelDataPtr pixelData,
66 return GetImplementation(*this).Upload( pixelData, xOffset, yOffset );
69 Atlas Atlas::DownCast( BaseHandle handle )
71 return Atlas( dynamic_cast<Dali::Internal::Atlas*>(handle.GetObjectPtr()) );
78 Atlas::Atlas( const Atlas& handle )
83 Atlas& Atlas::operator=( const Atlas& rhs )
85 BaseHandle::operator=(rhs);
89 Atlas::Atlas( Internal::Atlas* internal )